Methods
(static) increaseNonce(startNonce, endNonce) → {Uint8Array}
Increase the sequential NONCE by a value of 1.
This implementation assumes that the NONCE length is 8 bytes or fewer so it can fit in a long.
Parameters:
Name | Type | Description |
---|---|---|
startNonce |
Uint8Array | The starting nonce |
endNonce |
Uint8Array | The end nonce |
Throws:
SalmonRangeExceededException Thrown if nonce has exceeded range
Returns:
The nonce after incrementing
- Type
- Uint8Array
(static) splitNonceRange(startNonce, endNonce) → {Uint8Array}
Returns the middle nonce in the provided range.
Note: This assumes the nonce is 8 bytes, if you need to increase the nonce length
then the long transient variables will not hold. In that case you will need to
override with your own implementation.
Parameters:
Name | Type | Description |
---|---|---|
startNonce |
Uint8Array | The starting nonce. |
endNonce |
Uint8Array | The ending nonce in the sequence. |
Throws:
SalmonSecurityException Thrown when error with security
Returns:
The byte array with the middle nonce.
- Type
- Uint8Array