Constructor
new SalmonDefaultTransformer()
Classes
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. |
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. |
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. |
Throws:
SalmonSecurityException Thrown when error with security