Class: Yes::Core::DataDecryptor
- Inherits:
-
Object
- Object
- Yes::Core::DataDecryptor
- Defined in:
- lib/yes/core/data_decryptor.rb
Overview
Decrypts event data attributes using a key from the key repository.
Instance Method Summary collapse
-
#call ⇒ Hash
Decrypts the data attributes specified in the encryption metadata.
Instance Method Details
#call ⇒ Hash
Decrypts the data attributes specified in the encryption metadata.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/yes/core/data_decryptor.rb', line 14 def call return encrypted_data if .empty? result = find_key(['key']) return encrypted_data unless result.success? decrypt_attributes( key: result.value!, data: encrypted_data, attributes: ['attributes'] ) end |