nevermined_sdk_py.nevermined.secret_store module

class nevermined_sdk_py.nevermined.secret_store.SecretStore(config)

Bases: object

Nevermined SecretStore class.

decrypt(document_id, encrypted_content, account)

Decrypt a previously encrypted content using the secret store keys identified by document_id.

Note that decryption requires permission already granted to the consumer account.

Parameters
  • document_id – hex str id of document to use to retrieve the decryption keys

  • encrypted_content – hex str

  • account – Account instance to use for decrypting the encrypted_content

Returns

str original content

encrypt(document_id, content, account)

Encrypt string data using the DID as an secret store id, if secret store is enabled then return the result from secret store encryption

None for no encryption performed

Parameters
  • document_id – hex str id of document to use for encryption session

  • content – str to be encrypted

  • account – Account instance encrypting this content

Returns

hex str encrypted content