Class: SalmonDefaultTransformer

SalmonDefaultTransformer()

Salmon AES transformer based on the javax.crypto routines.

Constructor

new SalmonDefaultTransformer()

Source:

Classes

SalmonDefaultTransformer

Methods

(async) decryptData(srcBuffer, srcOffset, destBuffer, destOffset, count) → {Promise.<number>}

Decrypt the data.
Parameters:
Name Type Description
srcBuffer Uint8Array The source byte array.
srcOffset number The source byte offset.
destBuffer Uint8Array The destination byte array.
destOffset number The destination byte offset.
count number The number of bytes to transform.
Source:
Throws:
SalmonSecurityException Thrown when error with security
Returns:
The number of bytes transformed.
Type
Promise.<number>

(async) encryptData(srcBuffer, srcOffset, destBuffer, destOffset, count) → {Promise.<number>}

Encrypt the data.
Parameters:
Name Type Description
srcBuffer Uint8Array The source byte array.
srcOffset number The source byte offset.
destBuffer Uint8Array The destination byte array.
destOffset number The destination byte offset.
count number The number of bytes to transform.
Source:
Throws:
SalmonSecurityException Thrown when error with security
Returns:
The number of bytes transformed.
Type
Promise.<number>

(async) init(key, nonce)

Initialize the default Java AES cipher transformer.
Parameters:
Name Type Description
key Uint8Array The AES256 key to use.
nonce Uint8Array The nonce to use.
Source:
Throws:
SalmonSecurityException Thrown when error with security