Class: ExoBasic::PasswordEncryption

Inherits:
Object
  • Object
show all
Defined in:
lib/exobasic/encrypt/password_encryption.rb

Class Method Summary collapse

Class Method Details

.check_encrypted(encrypted, str) ⇒ Object


9
10
11
# File 'lib/exobasic/encrypt/password_encryption.rb', line 9

def self.check_encrypted(encrypted, str)
  BCrypt::Password.new(encrypted) == str
end

.encrypt(str) ⇒ Object


5
6
7
# File 'lib/exobasic/encrypt/password_encryption.rb', line 5

def self.encrypt(str)
  BCrypt::Password.create(str)
end