Class: Encrypto::Database::Encryptor

Inherits:
Object
  • Object
show all
Defined in:
lib/encrypto/database/encryptor.rb

Class Method Summary collapse

Class Method Details

.decrypt(options) ⇒ Object



10
11
12
13
# File 'lib/encrypto/database/encryptor.rb', line 10

def self.decrypt(options)
  box = Box.from_secret_key(options[:key])
  box.open(options[:value])
end

.encrypt(options) ⇒ Object



5
6
7
8
# File 'lib/encrypto/database/encryptor.rb', line 5

def self.encrypt(options)
  box = Box.from_secret_key(options[:key])
  box.box(options[:value])
end