lib/symmetric_encryption/keystore/memory.rb in symmetric-encryption-4.0.0 vs lib/symmetric_encryption/keystore/memory.rb in symmetric-encryption-4.0.1
- old
+ new
@@ -1,7 +1,8 @@
module SymmetricEncryption
module Keystore
+ # In Memory Keystore usually used for testing purposes
class Memory
attr_accessor :key_encrypting_key
attr_reader :encrypted_key
# Returns [Hash] a new cipher, and writes its encrypted key file.
@@ -24,11 +25,11 @@
version: version,
encrypted_key: encrypted_key,
iv: iv,
key_encrypting_key: {
key: kek.key,
- iv: kek.iv,
+ iv: kek.iv
}
}
end
# Stores the Encryption key in a string.
@@ -45,9 +46,8 @@
# Write the encrypted Encryption key to `encrypted_key` attribute.
def write(key)
self.encrypted_key = key_encrypting_key.encrypt(key)
end
-
end
end
end