Class: EventStoreClient::DataDecryptor

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

Constant Summary collapse

KeyNotFoundError =
Class.new(StandardError)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#decrypted_dataObject (readonly)

Returns the value of attribute decrypted_data.



17
18
19
# File 'lib/event_store_client/data_decryptor.rb', line 17

def decrypted_data
  @decrypted_data
end

#encryption_metadataObject (readonly)

Returns the value of attribute encryption_metadata.



17
18
19
# File 'lib/event_store_client/data_decryptor.rb', line 17

def 
  @encryption_metadata
end

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
# File 'lib/event_store_client/data_decryptor.rb', line 7

def call
  return decrypted_data if .empty?

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