Class: SymmetricCryptoApi

SymmetricCryptoApi()

Class provides functions for symmetric encryption and decryption.

Constructor

new SymmetricCryptoApi()

Source:

Classes

SymmetricCryptoApi

Methods

encrypt(data, nonce) → {Uint8Array}

Parameters:
Name Type Description
data Uint8Array
nonce Nonce

Same as encryption.ts:symmetricEncrypt

Source:
Returns:

Type: Uint8Array

encryptAndEmbedNonce(data, nonce) → {Uint8Array}

Parameters:
Name Type Description
data Uint8Array
nonce Nonce

Same as encryption.ts:symmetricEncryptAndEmbedNonce

Source:
Returns:

Type: Uint8Array

decrypt(cypher, nonce) → {Uint8Array}

Parameters:
Name Type Description
cypher Uint8Array
nonce Nonce

Same as encryption.ts:symmetricDecrypt

Source:
Returns:

Type: Uint8Array

decryptWithEmbeddedNonce(cypherAndNonce) → {Uint8Array}

Parameters:
Name Type Description
cypherAndNonce Uint8Array

Same as encryption.ts:symmetricDecryptAndRemoveNonce

Source:
Returns:

Type: Uint8Array