Class WinClientSequencer

java.lang.Object
com.mku.salmon.win.sequencer.WinClientSequencer
All Implemented Interfaces:
INonceSequencer, Closeable, AutoCloseable

public class WinClientSequencer extends Object implements INonceSequencer, Closeable
  • Constructor Details

  • Method Details

    • isServiceAdmin

      public static boolean isServiceAdmin(String pipeName)
    • createSequence

      public void createSequence(String driveId, String authId)
      Description copied from interface: INonceSequencer
      Create a sequence.
      Specified by:
      createSequence in interface INonceSequencer
      Parameters:
      driveId - The drive ID.
      authId - The authorization ID of the drive.
    • getSequence

      public NonceSequence getSequence(String driveId)
      Description copied from interface: INonceSequencer
      Get the sequence used for this drive.
      Specified by:
      getSequence in interface INonceSequencer
      Parameters:
      driveId - The drive ID.
      Returns:
      The current sequence.
    • initializeSequence

      public void initializeSequence(String driveId, String authId, byte[] startNonce, byte[] maxNonce)
      Description copied from interface: INonceSequencer
      Initialize the sequence.
      Specified by:
      initializeSequence in interface INonceSequencer
      Parameters:
      driveId - The drive ID.
      authId - The auth ID of the device for the drive.
      startNonce - The starting nonce.
      maxNonce - The maximum nonce.
    • nextNonce

      public byte[] nextNonce(String driveId)
      Description copied from interface: INonceSequencer
      Get the next nonce.
      Specified by:
      nextNonce in interface INonceSequencer
      Parameters:
      driveId - The drive ID.
      Returns:
      The next nonce.
    • revokeSequence

      public void revokeSequence(String driveId)
      Description copied from interface: INonceSequencer
      Revoke the sequencer. This terminates the sequencer and de-authorizes the device
      Specified by:
      revokeSequence in interface INonceSequencer
      Parameters:
      driveId - The drive Id
    • setMaxNonce

      public void setMaxNonce(String driveId, String authId, byte[] maxNonce) throws IOException
      Description copied from interface: INonceSequencer
      Set the max nonce
      Specified by:
      setMaxNonce in interface INonceSequencer
      Parameters:
      driveId - The drive ID.
      authId - The auth ID of the device for the drive.
      maxNonce - The maximum nonce.
      Throws:
      IOException - Thrown if there is an IO error.
    • generateRequest

      public String generateRequest(String driveId, String authId, WinClientSequencer.RequestType type, byte[] nextNonce, byte[] maxNonce) throws IOException
      Throws:
      IOException
    • close

      public void close()
      Description copied from interface: INonceSequencer
      Close the sequencer and any associated resources.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface INonceSequencer
    • getSIDString

      public static String getSIDString(WinNT.PSID sid)