lib/symmetric_encryption/keystore/file.rb in symmetric-encryption-4.1.0.beta1 vs lib/symmetric_encryption/keystore/file.rb in symmetric-encryption-4.1.0
- old
+ new
@@ -7,10 +7,10 @@
#
# Increments the supplied version number by 1.
def self.generate_data_key(key_path:, cipher_name:, app_name:, environment:, version: 0, dek: nil)
version >= 255 ? (version = 1) : (version += 1)
- dek ||= SymmetricEncryption::Key.new(cipher_name: cipher_name)
+ dek ||= SymmetricEncryption::Key.new(cipher_name: cipher_name)
kek = SymmetricEncryption::Key.new(cipher_name: cipher_name)
kekek = SymmetricEncryption::Key.new(cipher_name: cipher_name)
dek_file_name = ::File.join(key_path, "#{app_name}_#{environment}_v#{version}.encrypted_key")
new(key_filename: dek_file_name, key_encrypting_key: kek).write(dek.key)