lib/symmetric_encryption/cipher.rb in symmetric-encryption-3.4.0 vs lib/symmetric_encryption/cipher.rb in symmetric-encryption-3.6.0

- old
+ new

@@ -21,11 +21,11 @@ :compressed, # [true|false] Whether the data is compressed, if supplied in the header :iv, # [String] IV used to encrypt the data, if supplied in the header :key, # [String] Key used to encrypt the data, if supplied in the header :cipher_name, # [String] Name of the cipher used, if supplied in the header :version, # [Integer] Version of the cipher used, if supplied in the header - :decryption_cipher, # [SymmetricEncryption::Cipher] Cipher matching the header, or SymmetricEncryption.cipher(default_version) + :decryption_cipher # [SymmetricEncryption::Cipher] Cipher matching the header, or SymmetricEncryption.cipher(default_version) ) # Generate a new Symmetric Key pair # # Returns a hash containing a new random symmetric_key pair @@ -34,12 +34,12 @@ def self.random_key_pair(cipher_name = 'aes-256-cbc') openssl_cipher = ::OpenSSL::Cipher.new(cipher_name) openssl_cipher.encrypt { - :key => openssl_cipher.random_key, - :iv => openssl_cipher.random_iv, - :cipher_name => cipher_name + key: openssl_cipher.random_key, + iv: openssl_cipher.random_iv, + cipher_name: cipher_name } end # Create a Symmetric::Key for encryption and decryption purposes #