Class: SalmonAesIntrTransformer

SalmonAesIntrTransformer()

Salmon AES transformer implemented with AES intrinsics.

Constructor

new SalmonAesIntrTransformer()

Source:

Members

(static) AES_IMPL_AES_INTR

The constant to pass to the native code while initializing.
Source:

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:
Returns:
The number of bytes transformed.
Type
Promise.<number>

(async) encryptData(srcBuffer, srcOffset, destBuffer, destOffset, count)

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:
Returns:
The number of bytes transformed.

(async) init(key, nonce)

Initialize the native Aes intrinsics transformer.
Parameters:
Name Type Description
key Uint8Array The AES key to use.
nonce Uint8Array The nonce to use.
Source:
Throws:
SalmonSecurityException Thrown when error with security