lib/symmetric_encryption/keystore/environment.rb in symmetric-encryption-4.3.1 vs lib/symmetric_encryption/keystore/environment.rb in symmetric-encryption-4.3.2

- old
+ new

@@ -8,14 +8,14 @@ # # Increments the supplied version number by 1. def self.generate_data_key(cipher_name:, app_name:, environment:, version: 0, dek: nil, **_args) version >= 255 ? (version = 1) : (version += 1) - kek = SymmetricEncryption::Key.new(cipher_name: cipher_name) + kek = SymmetricEncryption::Key.new(cipher_name: cipher_name) dek ||= SymmetricEncryption::Key.new(cipher_name: cipher_name) - key_env_var = "#{app_name}_#{environment}_v#{version}".upcase.tr('-', '_') + key_env_var = "#{app_name}_#{environment}_v#{version}".upcase.tr("-", "_") new(key_env_var: key_env_var, key_encrypting_key: kek).write(dek.key) { keystore: :environment, cipher_name: dek.cipher_name, @@ -48,12 +48,12 @@ # Write the encrypted Encryption key to `encrypted_key` attribute. def write(key) encrypted_key = key_encrypting_key.encrypt(key) puts "\n\n********************************************************************************" - puts 'Set the environment variable as follows:' + puts "Set the environment variable as follows:" puts " export #{key_env_var}=\"#{encoder.encode(encrypted_key)}\"" - puts '********************************************************************************' + puts "********************************************************************************" end private # Returns [SymmetricEncryption::Encoder] the encoder to use for the current encoding.