Salmon
Loading...
Searching...
No Matches
Mku.Salmon.SalmonNonce Class Reference

Utility provides nonce operations. More...

Static Public Member Functions

static byte[] IncreaseNonce (byte[] startNonce, byte[] endNonce)
 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.
 
static byte[] SplitNonceRange (byte[] startNonce, byte[] endNonce)
 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.
 

Detailed Description

Utility provides nonce operations.

Member Function Documentation

◆ IncreaseNonce()

static byte[] Mku.Salmon.SalmonNonce.IncreaseNonce ( byte[] startNonce,
byte[] endNonce )
static

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
startNonceThe starting nonce
endNonceThe ending nonce
Returns
The nonce after increasing
Exceptions
SalmonRangeExceededExceptionThrown when maximum nonce range is exceeded.

◆ SplitNonceRange()

static byte[] Mku.Salmon.SalmonNonce.SplitNonceRange ( byte[] startNonce,
byte[] endNonce )
static

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
startNonceThe starting nonce.
endNonceThe ending nonce in the sequence.
Returns
The byte array with the middle nonce.
Exceptions
SalmonSecurityExceptionThrown when error with security

The documentation for this class was generated from the following file: