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
Written by Roger Lam
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#