Class: EventStoreClient::DataDecryptor

Inherits:
Object
  • Object
show all
Includes:
Configuration
Defined in:
lib/event_store_client/data_decryptor.rb

Constant Summary collapse

KeyNotFoundError =
Class.new(StandardError)

Instance Method Summary collapse

Methods included from Configuration

#config

Instance Method Details

#callObject



11
12
13
14
15
16
17
18
19
# File 'lib/event_store_client/data_decryptor.rb', line 11

def call
  return encrypted_data if .empty?

  decrypt_attributes(
    key: find_key(['key']),
    data: encrypted_data,
    attributes: ['attributes']
  )
end