Class NonceSequence

java.lang.Object
com.mku.sequence.NonceSequence

public class NonceSequence extends Object
Represents a nonce sequence for a specific device.
  • 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

      public String getId()
      Get the id.
      Returns:
      The sequence id
    • getAuthId

      public 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