5dfdkg
Last Updated: February 25, 2016
·
2.043K
· mrlamroger
4712b1249e0711c19e308698c44c8c2a

Rails with bcrypt-ruby makes encryption ONE LINE

These three magic words: "hassecurepassword"

I'm on chapter 6 of Michael Hartl's Rails tutorial and I am amazed at how easy it is to implement password encryption in rails!

http://ruby.railstutorial.org/chapters/modeling-users#sec-adding_a_secure_password

Of course, the code implementation can be found here:
https://github.com/rails/rails/blob/master/activemodel/lib/active_model/secure_password.rb

bcrypt uses the blowfish encryption algorithm, a symmetric key algorithm.
Heres more info on it:
http://en.wikipedia.org/wiki/Blowfish_%28cipher%29
http://www.ehow.com/info_10011200_blowfish-symmetric-encryption-algorithm.html

Say Thanks
Respond