diff --git a/global_business/business/lib/password_hasher.rb b/global_business/business/lib/password_hasher.rb new file mode 100644 index 000000000..489f1d520 --- /dev/null +++ b/global_business/business/lib/password_hasher.rb @@ -0,0 +1,11 @@ +require 'bcrypt' + +class PasswordHasher + def self.hash_password(password) + BCrypt::Password.create(password) + end + + def self.verify_password(password, hashed_password) + BCrypt::Password.new(hashed_password) == password + end +end