password-encryption

Spring Security 3 + Random Salt

孤街浪徒 提交于 2019-12-10 11:34:19
问题 So I understand that you can check a password in Spring Security with salt based on a userDetail property and then hash it to compare to a hash in the database, however what if the salt used when creating each user is random (and is stored in the DB), would I need to create my own userDetails class that contains a salt property and then set that as the field spring security uses to salt with in the securityApplicationContext? If so how would I go about writing my own userDetails class to

How to hide/protect password details in php?

老子叫甜甜 提交于 2019-12-10 10:55:19
问题 I'm making a website in which I'm trying to create a form that will send the user-input to a google spreadsheet in my google docs/drive... I found a Github project that lets people code the php... It includes 2 other php files which are needed for the script. The code is as follows: My question is, how can I hide my password from this script under $u = / $p = ?? Anyone viewing the code can see my password.. how can I prevent that? Link to the script's source is : http://www.farinspace.com

how to securely store a password for a 3rd party service in django?

只谈情不闲聊 提交于 2019-12-10 10:50:24
问题 I'm running a web service on Django. Users register to my system and provide me login details (username and password) for a 3rd party web service). My purpose is to store this details in the best and safest way. Unfortunately my service needs this data for some offline scripts that query the 3rd party service, so I cannot store the login/password encrypted with user password (and use it to a key do decipher them. I read lots of articles on stackoverflow, but most of them (like: What is the

Correct way to store passwords in PHP

半城伤御伤魂 提交于 2019-12-09 18:58:33
问题 Fundamental difference between Hashing and Encryption algorithms Preferred Method of Storing Passwords In Database http://codahale.com/how-to-safely-store-a-password/ I am confused about two things. If PHP 7.0 bcrypt provides a randomized salt. How are we supposed to retrieve it for password verification? I understand there key stretching functions like PBKDF2 but can someone explain to me why a memory intensive hashing algorithm like scrypt is preferred over something like bcrypt? Besides

Multiple Encryption Technique in Java

半世苍凉 提交于 2019-12-08 22:41:34
Is it safe to encrypt an already encrypted data using another algorithm? For instance, I have encrypted a password using "PBKDF2WithHmacSHA1". Now I want to further encrypt it using "SHA512" (since it is considered better than "SHA1") Will that in any way weaken my encryption? Also, should I reverse the encrypted password to increase security? Even if "PBKDF2WithHmacSHA1" is enough, I would rather have extra layers of protection. That is why I have been thinking of multiple encryption. However, I am not intending to use third-party options such as BouncyCastle at present. It would be helpful

Password encryption using SecureString for plink.exe command

柔情痞子 提交于 2019-12-08 05:44:33
问题 I would like to encrypt a password in PowerShell I tried this : In CLI : Read-Host -prompt "Password ?" -AsSecureString | ConvertFrom-SecureString | out-file "D:\root.pwd" In my script.ps1 : $pwsNAS = Get-Content "D:\root.pwd" | ConvertTo-SecureString plink.exe root@192.168.x.y -pw $pwdNAS df But it doesn't work... I tried with credentials, but it doesn't seems to be better... (My password doesn't have any space or accented character) Any idea? 回答1: Of course it doesn't work. plink expects a

Multiple Encryption Technique in Java

倾然丶 夕夏残阳落幕 提交于 2019-12-08 03:52:31
问题 Is it safe to encrypt an already encrypted data using another algorithm? For instance, I have encrypted a password using "PBKDF2WithHmacSHA1". Now I want to further encrypt it using "SHA512" (since it is considered better than "SHA1") Will that in any way weaken my encryption? Also, should I reverse the encrypted password to increase security? Even if "PBKDF2WithHmacSHA1" is enough, I would rather have extra layers of protection. That is why I have been thinking of multiple encryption.

node.js how to repreduce PHP MD5 encryption

只谈情不闲聊 提交于 2019-12-07 08:18:59
问题 I'm converting an existing php based website to a node.js app, and I need to reproduce this encryption method from php to js. private static $_passwordSalt = 'd2g6IOP(U(&§)%U§VUIPU(HN%V/§§URerjh0ürfqw4zoöqe54gß0äQ"LOU$3wer'; public static function getCryptedPassword($password = 'password') { return sha1(md5(self::$_passwordSalt.$password)); } So far I've tried this but it does not return the same results: UserSchema.methods.hashPassword = function(password) { var salt = 'd2g6IOP(U(&§

How to use Spring StandardPasswordEncode and Get Salt Generate?

大城市里の小女人 提交于 2019-12-07 04:26:39
问题 How do I encrypt a password insert it into the db and after the comparison when he will want to connect? I would use StandardPasswordEncoder Spring security 3.1.4 to encrypt my password and insert into the db. But how do I recovered the salt generated by the method? Here is an example of the doc Spring security: StandardPasswordEncoder encoder = new StandardPasswordEncoder("secret"); String result = encoder.encode("myPassword"); assertTrue(encoder.matches("myPassword", result)); I asked her

How to create a PBKDF2-SHA256 password hash in C# / Bouncy Castle

北慕城南 提交于 2019-12-07 00:10:49
问题 I need to create a PBKDF2-SHA256 password hash, but am having some trouble. I downloaded the Bouncy Castle repo, but got a bit stuck finding what I was looking for in the Unit Tests. Found some sample code here, but this only does SHA1. The key bit of code is: /// <summary> /// Computes the PBKDF2-SHA1 hash of a password. /// </summary> /// <param name="password">The password to hash.</param> /// <param name="salt">The salt.</param> /// <param name="iterations">The PBKDF2 iteration count.<