Interface INonceSequencer

All Known Implementing Classes:
SalmonFileSequencer, WinClientSequencer, WinFileSequencer

public interface INonceSequencer
Nonce sequencer.
  • Method Details

    • createSequence

      void createSequence(String driveId, String authId)
      Create a sequence.
      Parameters:
      driveId - The drive ID.
      authId - The authorization ID of the drive.
      Throws:
      SequenceException - Thrown if there is an error with the nonce sequence
    • initializeSequence

      void initializeSequence(String driveId, String authId, byte[] startNonce, byte[] maxNonce) throws IOException
      Initialize the sequence.
      Parameters:
      driveId - The drive ID.
      authId - The auth ID of the device for the drive.
      startNonce - The starting nonce.
      maxNonce - The maximum nonce.
      Throws:
      SequenceException - Thrown if there is an error with the nonce sequence
      IOException - Thrown if there is an IO error.
    • setMaxNonce

      void setMaxNonce(String driveId, String authId, byte[] maxNonce) throws IOException
      Set the max nonce
      Parameters:
      driveId - The drive ID.
      authId - The auth ID of the device for the drive.
      maxNonce - The maximum nonce.
      Throws:
      SequenceException - Thrown if there is an error with the nonce sequence
      IOException - Thrown if there is an IO error.
    • nextNonce

      byte[] nextNonce(String driveId)
      Get the next nonce.
      Parameters:
      driveId - The drive ID.
      Returns:
      The next nonce.
      Throws:
      SequenceException - Thrown if there is an error with the nonce sequence
      SalmonRangeExceededException - Thrown if the nonce exceeds its range
    • revokeSequence

      void revokeSequence(String driveId)
      Revoke the sequencer. This terminates the sequencer and de-authorizes the device
      Parameters:
      driveId - The drive Id
      Throws:
      SequenceException - Thrown if there is an error with the nonce sequence
    • getSequence

      NonceSequence getSequence(String driveId)
      Get the sequence used for this drive.
      Parameters:
      driveId - The drive ID.
      Returns:
      The current sequence.
      Throws:
      SequenceException - Thrown if there is an error with the nonce sequence
    • close

      void close()
      Close the sequencer and any associated resources.