Passwords key

Re: Passwords key

by y h -
Number of replies: 3

I am using

string cryptedPassword = Crypter.Blowfish.Crypt("password", "$2y$10$SNUjOqCuwKodg0E126mHUO");

And it works for me. Thank you for you help.

PS: The salt could be different then the one i used but it should have the same number of digit and begins with $2y$10$... 

In reply to y h

Re: Passwords key

by Guillermo Madero -

Hi again,

Maybe you are already doing it, but it would be best to generate the salt each and everytime a password is hashed. For this you can use the GenerateSalt method:

Crypter.Blowfish.GenerateSalt( int rounds )

Then you would have:

Crypter.Blowfish.Crypt( userpassword, Crypter.Blowfish.GenerateSalt( 10 ) );

Because the number "10" in "$2y$10$" referes to the number of rounds.

In reply to Guillermo Madero

Re: Passwords key

by y h -

Hismile thank you, I followed your advice and I'm using now:

string cryptedpassword = Crypter.Blowfish.Crypt(password, new CrypterOptions(){{CrypterOption.Variant, BlowfishCrypterVariant.Corrected}, {CrypterOption.Rounds,10}});

In reply to y h

Re: Passwords key

by Guillermo Madero -

Well, I never got as far as getting into C# so I wouldn't know if that's the correct way to do it. Anyway, just make sure you check the results smile

Cheers!