Package com.mku.salmon.sequence
Class NonceSequence
- java.lang.Object
-
- com.mku.salmon.sequence.NonceSequence
-
public class NonceSequence extends java.lang.ObjectRepresents a nonce sequence for a specific device.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNonceSequence.StatusSequence status.
-
Constructor Summary
Constructors Constructor Description NonceSequence(java.lang.String id, java.lang.String authId, byte[] nextNonce, byte[] maxNonce, NonceSequence.Status status)Instantiate a nonce sequence with the provided authorization id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAuthId()Get the authorization id of the device.java.lang.StringgetId()Get the id.byte[]getMaxNonce()Get the max nonce.byte[]getNextNonce()Get the next nonce.NonceSequence.StatusgetStatus()Get the sequence status.voidsetMaxNonce(byte[] maxNonce)Set the max nonce.voidsetNextNonce(byte[] nextNonce)Set the next nonce.voidsetStatus(NonceSequence.Status status)Set the sequence status.
-
-
-
Constructor Detail
-
NonceSequence
public NonceSequence(java.lang.String id, java.lang.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 Detail
-
getId
public java.lang.String getId()
Get the id.- Returns:
- The sequence id
-
getAuthId
public java.lang.String 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
public NonceSequence.Status getStatus()
Get the sequence status.- Returns:
- The sequence status
-
setStatus
public void setStatus(NonceSequence.Status status)
Set the sequence status.- Parameters:
status- The sequence status
-
-