Class ScramSaslClient.ClientFinalMessage

  • Enclosing class:
    ScramSaslClient

    static class ScramSaslClient.ClientFinalMessage
    extends Object
    Properties associated with the final client message.
    • Field Detail

      • GS2_NO_CHANNEL_BINDING

        private static final String GS2_NO_CHANNEL_BINDING
        GS2 header for no channel binding.
      • INTEGER_ONE

        private static final byte[] INTEGER_ONE
        4-octet encoding of the integer 1.
      • CLIENT_KEY_INIT

        private static final byte[] CLIENT_KEY_INIT
        Bytes for the client key hmac.
      • mechanism

        private final Mechanism mechanism
        Scram SASL mechanism.
      • withoutProof

        private final String withoutProof
        Channel binding attribute plus the combined nonce.
      • message

        private final String message
        Client first message plus the server first message plus the withoutProof string.
      • saltedPassword

        private final byte[] saltedPassword
        Computed password using the server salt and iterations.
    • Constructor Detail

    • Method Detail

      • getSaltedPassword

        public byte[] getSaltedPassword()
      • getMessage

        public String getMessage()
      • encode

        public String encode()
        Encodes this message to send to the server. Concatenation of the message without proof and the proof.
        Returns:
        encoded message
      • createSaltedPassword

        private static byte[] createSaltedPassword​(String algorithm,
                                                   String password,
                                                   byte[] salt,
                                                   int iterations)
        Computes a salted password.
        Parameters:
        algorithm - of the MAC
        password - to seed the MAC with
        salt - for the MAC
        iterations - of the MAC
        Returns:
        salted password