Class: Lockbox::Encryptor
- Inherits:
-
Object
- Object
- Lockbox::Encryptor
- Defined in:
- lib/lockbox/encryptor.rb
Class Method Summary collapse
Class Method Details
.box(options) ⇒ Object
11 12 13 14 15 |
# File 'lib/lockbox/encryptor.rb', line 11 def self.box() = .slice(:key, :encryption_key, :decryption_key, :algorithm, :previous_versions) [:algorithm] = "aes-gcm" if [:algorithm] == "aes-256-gcm" Lockbox.new() end |
.decrypt(options) ⇒ Object
7 8 9 |
# File 'lib/lockbox/encryptor.rb', line 7 def self.decrypt() box().decrypt([:value]) end |
.encrypt(options) ⇒ Object
3 4 5 |
# File 'lib/lockbox/encryptor.rb', line 3 def self.encrypt() box().encrypt([:value]) end |