nifty-generators icon indicating copy to clipboard operation
nifty-generators copied to clipboard

Use BCrypt::Password instead of BCrypt::Engine

Open etdsoft opened this issue 14 years ago • 2 comments

Hey Ryan,

It seems that BCrypt::Password.create(plaintext) would internally use BCrypt::Engine to generate a salt. Maybe that can simplify the library and have an even smaller footprint on the DB?

Maybe you have researched this and it doesn't make sense...

Here are the docs:

http://bcrypt-ruby.rubyforge.org/classes/BCrypt/Password.html#M000007

etdsoft avatar Jun 28 '11 05:06 etdsoft

Yes, I believe this is what SecurePassword does. This way we don't have to store a salt. I'll mark this for being added.

ryanb avatar Jun 29 '11 17:06 ryanb

Cool,

I have implemented this already. Will send a pull request just in case it makes things any easier on your side.

etdsoft avatar Jun 29 '11 17:06 etdsoft