Module: Pwss::Cipher
- Defined in:
- lib/pwss/cipher.rb
Class Method Summary collapse
Class Method Details
.decrypt(string, password) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/pwss/cipher.rb', line 13 def self.decrypt string, password begin Encryptor.decrypt(:value => string, :key => password) rescue Exception => e puts "Unable to decrypt. Exiting" exit 1 end end |
.encrypt(string, password) ⇒ Object
9 10 11 |
# File 'lib/pwss/cipher.rb', line 9 def self.encrypt string, password Encryptor.encrypt(:value => string, :key => password) end |