Constructor
new SalmonNativeProxy()
Methods
expandKey(key, expandedKey)
Proxy Key schedule algorithm for expanding the 32 byte key to 240 bytes required
Parameters:
Name | Type | Description |
---|---|---|
key |
Uint8Array | The key |
expandedKey |
Uint8Array | The expanded key |
init(aesImpl)
Proxy Init the native code with AES implementation, and hash length options.
Parameters:
Name | Type | Description |
---|---|---|
aesImpl |
number |
loadLibrary()
Load the native library
transform(key, counter, srcBuffer, srcOffset, destBuffer, destOffset, count) → {number}
Transform the input byte array using AES-256 CTR mode
Parameters:
Name | Type | Description |
---|---|---|
key |
Uint8Array | The key |
counter |
Uint8Array | The counter |
srcBuffer |
Uint8Array | The source buffer |
srcOffset |
number | The source buffer offset |
destBuffer |
Uint8Array | The destination buffer |
destOffset |
number | The destination buffer offset |
count |
number | The number of bytes to transform |
Returns:
The number of bytes transformed
- Type
- number