lib/eco/data/crypto/encryption.rb in eco-helpers-2.0.16 vs lib/eco/data/crypto/encryption.rb in eco-helpers-2.0.17

- old
+ new

@@ -1,9 +1,9 @@ require 'openssl' -require 'json' +# 'json' require 'base64' -require 'pp' +#require 'pp' require_relative '../../cli/scripting' # see some ramblings here: http://distributed-frostbite.blogspot.com/2010/06/file-encryption-in-ruby-with-openssl.html @@ -145,10 +145,10 @@ end str_c += cipher.final return str_c #EncryptedData.new({content: str_c, key: key, iv: iv}) - + end def aes256_decrypt(data, key: , iv: , block_octets: BLOCK_OCTETS) block_bits = block_bits * 8 #validation = encrypted_data && encrypted_data.key && encrypted_data.iv # return nil unless validation