Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.