Package com.mku.sequence
Class NonceSequence
java.lang.Object
com.mku.sequence.NonceSequence
Represents a nonce sequence for a specific device.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionNonceSequence
(String id, String authId, byte[] nextNonce, byte[] maxNonce, NonceSequence.Status status) Instantiate a nonce sequence with the provided authorization id. -
Method Summary
Modifier and TypeMethodDescriptionGet the authorization id of the device.getId()
Get the id.byte[]
Get the max nonce.byte[]
Get the next nonce.Get the sequence status.void
setMaxNonce
(byte[] maxNonce) Set the max nonce.void
setNextNonce
(byte[] nextNonce) Set the next nonce.void
setStatus
(NonceSequence.Status status) Set the sequence status.
-
Constructor Details
-
NonceSequence
public NonceSequence(String id, String authId, byte[] nextNonce, byte[] maxNonce, NonceSequence.Status status) Instantiate a nonce sequence with the provided authorization id.- Parameters:
id
- The id.authId
- The authorization id for a specific device.nextNonce
- The next available nonce to be used.maxNonce
- The maximum nonce.status
- The status of the sequencer.
-
-
Method Details
-
getId
Get the id.- Returns:
- The sequence id
-
getAuthId
Get the authorization id of the device.- Returns:
- The authorization id
-
getNextNonce
public byte[] getNextNonce()Get the next nonce.- Returns:
- The next nonce
-
setNextNonce
public void setNextNonce(byte[] nextNonce) Set the next nonce.- Parameters:
nextNonce
- The next nonce
-
getMaxNonce
public byte[] getMaxNonce()Get the max nonce.- Returns:
- The max nonce
-
setMaxNonce
public void setMaxNonce(byte[] maxNonce) Set the max nonce.- Parameters:
maxNonce
- The maximum nonce
-
getStatus
Get the sequence status.- Returns:
- The sequence status
-
setStatus
Set the sequence status.- Parameters:
status
- The sequence status
-