class CryptoHelper

The crypto helper can be used to encrypt or decrypt data with the defuse PHP encryption library.

Methods

getSharedEncryptionKey()

Gets a key based on the coid://common.cloudobjects.io/usesSharedEncryptionKey value for the default namespace.

encryptWithSharedEncryptionKey($data)

Encrypt data with the default namespace's shared encryption key.

decryptWithSharedEncryptionKey($data)

Decrypt data with the default namespace's shared encryption key.

__construct(ObjectRetriever $objectRetriever, IRI $namespaceCoid = null)

No description

Details

at line 30
getSharedEncryptionKey()

Gets a key based on the coid://common.cloudobjects.io/usesSharedEncryptionKey value for the default namespace.

at line 41
encryptWithSharedEncryptionKey($data)

Encrypt data with the default namespace's shared encryption key.

Parameters

$data

at line 48
decryptWithSharedEncryptionKey($data)

Decrypt data with the default namespace's shared encryption key.

Parameters

$data

at line 56
__construct(ObjectRetriever $objectRetriever, IRI $namespaceCoid = null)

Parameters

ObjectRetriever $objectRetriever An initialized and authenticated object retriever.
IRI $namespaceCoid The namespace used to retrieve keys. If this parameter is not provided, the namespace provided with the "auth_ns" configuration option from the object retriever is used.