Module: Legion::Extensions::Llm::Ledger::Helpers::Decryption
- Defined in:
- lib/legion/extensions/llm/ledger/helpers/decryption.rb
Class Method Summary collapse
Class Method Details
.decrypt_if_needed(payload, metadata = {}) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/legion/extensions/llm/ledger/helpers/decryption.rb', line 11 def decrypt_if_needed(payload, = {}) encoding = .dig(:properties, :content_encoding).to_s return symbolize(payload) unless encoding == 'encrypted/cs' ensure_crypt_available! perform_decryption(payload, ) end |