nevermined_sdk_py.secret_store.secret_store module

class nevermined_sdk_py.secret_store.secret_store.SecretStore(url, parity_url, account)

Bases: object

Wrapper around the secret store client.

decrypt_document(document_id, encrypted_content)

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 for encryption session

  • encrypted_content – hex str – the encrypted content from a previous encrypt_document operation

Returns

None – if decryption failed str – the original content that was encrypted previously

encrypt_document(document_id, content, threshold=0)

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

  • threshold – int

Returns

None – if encryption failed hex str – the encrypted document

static set_client(secret_store_client)

Set a different secret store client.

Parameters

secret_store_client – SecretStore client

set_secret_store_url(url)

Set secret store url.

Parameters

url – Url, str