Class: Ccs::Decrypter

Inherits:
Object
  • Object
show all
Defined in:
lib/ccs/decrypter.rb

Instance Method Summary collapse

Constructor Details

#initialize(passphrase, content) ⇒ Decrypter

Returns a new instance of Decrypter.



5
6
7
8
# File 'lib/ccs/decrypter.rb', line 5

def initialize(passphrase, content)
  @passphrase = passphrase
  @content = content
end

Instance Method Details

#callObject



10
11
12
13
14
# File 'lib/ccs/decrypter.rb', line 10

def call
  decryptor.pkcs5_keyivgen(@passphrase, ciphertext_salt, 1)
  result = decryptor.update(encrypted)
  result << decryptor.final
end