Class: EncryptedYaml::Decrypt

Inherits:
Object
  • Object
show all
Defined in:
lib/encrypted_yaml/decrypt.rb

Overview

Note:

uses AES256

Handles decryption

Instance Method Summary collapse

Constructor Details

#initialize(key, iv) ⇒ Decrypt



9
10
11
12
# File 'lib/encrypted_yaml/decrypt.rb', line 9

def initialize(key, iv)
  @key = key
  @iv = iv
end

Instance Method Details

#decrypt(data) ⇒ String



16
17
18
19
# File 'lib/encrypted_yaml/decrypt.rb', line 16

def decrypt(data)
  cipher = get_cipher
  cipher.update(data) + cipher.final
end