Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby User Authentication with Rails Password Hashing and Sign In Creating the User Model: Part 1

Margaret Rogers
Margaret Rogers
2,473 Points

bcrypt still the best way?

It looks like they mention bcrypt as being the best at that time. Are there better ones now?

1 Answer

Bcrypt has a few things going for it that make it a great choice for anyone creating a user authentication system:

  • It's time and battle tested, having been around for over 15 years and widely used in production.
  • It's slow, meaning that it takes longer for attackers to make each of their millions of guesses.
  • It's implemented in Ruby, JavaScript, Python, and Java.
  • It's been bundled into easy to use and well maintained packages, such as the bcrypt-rails gem.

There are other hashing solutions, and there will be more as time goes by, but Bcrypt remains a safe choice.