lib/symmetric_encryption/symmetric_encryption.rb in symmetric-encryption-3.8.0 vs lib/symmetric_encryption/symmetric_encryption.rb in symmetric-encryption-3.8.1

- old
+ new

@@ -269,10 +269,11 @@ def self.generate_symmetric_key_files(filename=nil, environment=nil) config = Config.read_config(filename, environment) # Only regenerating the first configured cipher cipher_config = config[:ciphers].first - Cipher.generate_random_keys({environment: environment, private_rsa_key: config[:private_rsa_key]}.merge(cipher_config)) + key_config = {environment: environment, private_rsa_key: config[:private_rsa_key]} + Cipher.generate_random_keys(key_config.merge(cipher_config)) end # Generate a 22 character random password def self.random_password Base64.encode64(OpenSSL::Cipher.new('aes-128-cbc').random_key)[0..-4].strip