lib/symmetric_encryption/keystore.rb in symmetric-encryption-4.5.0 vs lib/symmetric_encryption/keystore.rb in symmetric-encryption-4.6.0
- old
+ new
@@ -218,11 +218,10 @@
# Backward compatibility - Deprecated
private_rsa_key = config.delete(:private_rsa_key)
# Migrate old encrypted_iv
if (encrypted_iv = config.delete(:encrypted_iv)) && private_rsa_key
- encrypted_iv = RSAKey.new(private_rsa_key).decrypt(encrypted_iv)
- config[:iv] = ::Base64.decode64(encrypted_iv)
+ config[:iv] = RSAKey.new(private_rsa_key).decrypt(::Base64.decode64(encrypted_iv))
end
# Migrate old iv_filename
if (file_name = config.delete(:iv_filename)) && private_rsa_key
encrypted_iv = ::File.read(file_name)