password-encryption

Passwords hashed differently on different servers

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 00:23:12
问题 This is quite strange. Everything has been working fine on the shared server, but the passwords given when users register are hashed completely differently. For example this is about how all hashed passwords look like in phpmyadmin on a shared server: $P$BFLZVVoJlzQpwA3STCCmcXy.s/bRQa0 And this is how they are created on the dedicated server: $2a$08$Kdk3Zg11Va0LvAWTDacLYeqgKbojUY2Tuqtg4QXuhx/ It's longer and it looks different. I checked it many times. The same files are uploaded on both

hashing passwords with pbkdf2 crypto does not work correctly

人走茶凉 提交于 2019-12-11 12:24:15
问题 Password security is not my strong suit. Please help me out. I use node.js 4.2.3 express 4.13.3. I found some examples to hash and salt passwords with crypto's pbkdf2. Here is my code. var salt = crypto.randomBytes(10).toString('base64'); console.log("salt > "+salt); crypto.pbkdf2(pass, salt , 10000, 150, 'sha512',function(err, derivedKey) { pass = derivedKey.toString('hex'); }); The final derivedKey does not include the salt. What am I missing? Should I join the two strings manually before

Convert 'String' to Base64 encode of MD5 'String' in c# .net

不羁岁月 提交于 2019-12-11 12:23:20
问题 How can i Convert my password 'String' to Base64 encode of MD5 'String'. Like this string ' password ' to ' X03MO1qnZdYdgyfeuILPmQ== '. Please help me here OR just let me know the technique that how can i convert this ' password ' to ' X03MO1qnZdYdgyfeuILPmQ== '. i will code it myself 回答1: Ok, there is example (vb.net, I'll try to convert in c# using some online converter) : Dim pwd As String = "password" Dim hs As System.Security.Cryptography.MD5 = System.Security.Cryptography.MD5.Create Dim

Encrypt Credentials, Export, then Import

馋奶兔 提交于 2019-12-11 11:49:47
问题 I've been working with Powershell for quite some time now but I don't understand how the encryption works, not even sure I'm using the right syntax from reading the help files. #Get User Information $User = Read-Host "Please enter your username" $Password = Read-Host "Please enter your password. This will be encrypted" -AsSecureString | ConvertTo-SecureString -AsPlainText -Force #Define a Key File $KeyFile = "C:\Powershell\AES.key" $Key = New-Object Byte[] 32 [Security.Cryptography

Symfony2 password encoder function in Javascript

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 11:06:58
问题 I created a Symfony2 application using FOSUserBundle and FOSRestBundle. I'd like to connect other application with my Symfony application using rest api. I need to write the Symfony password encoder function in Javascript. Actually in PHP, it goes like: $salt = "secret"; $password = "azerty"; $salted = $password.'{'.$salt.'}'; $digest = hash('sha512', $salted, true); for ($i = 1; $i < 5000; $i++) { $digest = hash('sha512', $digest.$salted, true); } $digest = base64_encode($digest); return

How to reproduce ASP.NET MVC 4 password hash

有些话、适合烂在心里 提交于 2019-12-11 09:48:46
问题 How to reproduce ASP.NET MVC 4 password hash, produced by the built-in membership system? Example: Input: loz123 Output: APeJ4h0M4h7OFz91WwmJUjFfI2Daiq5xaUaZzcevoyWfkPZ3SYFJ48F+YzNrBNvaJA== The "Salt" field in database is empty. I am transferring data from one database to another. In the source database passwords are stored as plain text. In the destination database, the passwords should be stored as hashes generated by ASP.NET Membership system. I know the hashing is something about using

Storing a password in a string before sending to database

心不动则不痛 提交于 2019-12-11 08:11:26
问题 I'm trying to learn some good practice for handling passwords. I will supply some code snippets from my project and explain what I'm worried and curious about. Lets start with the code that gets the user input, my button event code: string username = txtUser.Text; string password = Hash.EncryptString(txtPass.Text); Here my idea is that, storing a password in a string in clear text is probably bad practice? I'm aware this is probably not the solution to that (especially since I'm sending it in

Zend\Crypt\Password\BCrypt verify method

跟風遠走 提交于 2019-12-11 03:50:44
问题 I am using Zend\Crypt\Password\Bcrypt for storing passwords encrypted in the database. But now I looked a bit closer and I don't seem to understand the verify method of this class: /** * Verify if a password is correct against a hash value * * @param string $password * @param string $hash * @throws Exception\RuntimeException when the hash is unable to be processed * @return bool */ public function verify($password, $hash) { $result = crypt($password, $hash); return Utils::compareStrings($hash

AES-256 encryption workflow in scala with bouncy castle: salt and IV usage and transfer/storage

帅比萌擦擦* 提交于 2019-12-11 02:59:40
问题 I'm trying to implement secure encryption of the files to be sent over insecure channel or stored in an insecure place. I use bouncy castle framework, my code is written in scala. I decided to use aes-256 (to be more specific - Rinjael with 256 bit block size, here is why). And it seems like I can use Rinjael with any (128|160|192|256) block length. I cannot understand the whole process overview correctly. Here is one of good answers, in this question there is some useful code specific to

Codeigniter strange encryption of password

余生长醉 提交于 2019-12-10 12:24:08
问题 I'm new to Codeigniter and trying to make a user registration. And I've met strange thing. At first I'll tell what exactly I'm doing with my password value: $password = stripslashes($password); $password = htmlspecialchars($password); $password = md5($password); $password = strrev($password); And then I'm saving it to the DB: $data = array( 'email' => $email, 'reg_type' => $reg_type, 'password' => $password ); $this->CI->db->insert('user', $data); And no matter what password I enter, It's