Class ServerFirstMessage

  • All Implemented Interfaces:
    StringWritable

    public class ServerFirstMessage
    extends Object
    implements StringWritable
    Constructs and parses server-first-messages. Formal syntax is: server-first-message = [reserved-mext ","] nonce "," salt "," iteration-count ["," extensions] Note that extensions are not supported.
    See Also:
    [RFC5802] Section 7
    • Field Detail

      • ITERATION_MIN_VALUE

        public static final int ITERATION_MIN_VALUE
        Minimum allowed value for the iteration, as per the RFC.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ServerFirstMessage

        public ServerFirstMessage​(String clientNonce,
                                  String serverNonce,
                                  String salt,
                                  int iteration)
                           throws IllegalArgumentException
        Constructs a server-first-message from a client-first-message and the additional required data.
        Parameters:
        clientNonce - String representing the client-first-message
        serverNonce - Server serverNonce
        salt - The salt
        iteration - The iteration count (must be <= 4096)
        Throws:
        IllegalArgumentException - If clientFirstMessage, serverNonce or salt are null or empty, or iteration < 4096
    • Method Detail

      • getClientNonce

        public String getClientNonce()
      • getServerNonce

        public String getServerNonce()
      • getNonce

        public String getNonce()
      • getSalt

        public String getSalt()
      • getIteration

        public int getIteration()