Class DigestAuthenticator.NonceInfo

  • Enclosing class:
    DigestAuthenticator

    public static class DigestAuthenticator.NonceInfo
    extends java.lang.Object
    Tracks information about a server nonce, including timestamp and seen nonce counts.
    • Constructor Summary

      Constructors 
      Constructor Description
      NonceInfo​(long currentTime, int seenWindowSize)
      Create a new NonceInfo instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getTimestamp()
      Get the timestamp when this nonce was created.
      boolean nonceCountValid​(long nonceCount)
      Validate the nonce count to detect replay attacks.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NonceInfo

        public NonceInfo​(long currentTime,
                         int seenWindowSize)
        Create a new NonceInfo instance.
        Parameters:
        currentTime - Current timestamp
        seenWindowSize - Size of the window for tracking seen nonce counts
    • Method Detail

      • nonceCountValid

        public boolean nonceCountValid​(long nonceCount)
        Validate the nonce count to detect replay attacks.
        Parameters:
        nonceCount - Nonce count from the client
        Returns:
        true if the nonce count is valid
      • getTimestamp

        public long getTimestamp()
        Get the timestamp when this nonce was created.
        Returns:
        Timestamp in milliseconds