lib/symmetric_encryption/key.rb in symmetric-encryption-4.3.1 vs lib/symmetric_encryption/key.rb in symmetric-encryption-4.3.2
- old
+ new
@@ -1,10 +1,10 @@
# The key, iv and encrypted data are handled in their raw form, with no encoding.
module SymmetricEncryption
class Key
attr_reader :key, :iv, :cipher_name
- def initialize(key: :random, iv: :random, cipher_name: 'aes-256-cbc')
+ def initialize(key: :random, iv: :random, cipher_name: "aes-256-cbc")
@key = key == :random ? ::OpenSSL::Cipher.new(cipher_name).random_key : key
@iv = iv == :random ? ::OpenSSL::Cipher.new(cipher_name).random_iv : iv
@cipher_name = cipher_name
end