This namespace contains cryptographic helper methods to encrypt and decrypt data with automatic handling of keys
Methods
static Decrypt({cap,encryptedData}) → Promise.<Buffer>
Decrypt data with headers
Returns: Decrypted data
Parameters:
Name | Type | Description |
---|---|---|
cap |
Object |
Encryption "capsule" containing keys |
encryptedData |
ArrayBuffer | Buffer |
Data to decrypt |
static Encrypt({cap,data}) → Promise.<Buffer>
Encrypt data with headers
Returns: Decrypted data
Parameters:
Name | Type | Description |
---|---|---|
cap |
Object |
Encryption "capsule" containing keys |
data |
ArrayBuffer | Buffer |
Data to encrypt |