Class SASLDigestMD5Mechanism

java.lang.Object
org.jivesoftware.smack.sasl.SASLMechanism
org.jivesoftware.smack.sasl.provided.SASLDigestMD5Mechanism
All Implemented Interfaces:
Comparable<org.jivesoftware.smack.sasl.SASLMechanism>

public class SASLDigestMD5Mechanism extends org.jivesoftware.smack.sasl.SASLMechanism
  • Field Details

  • Constructor Details

    • SASLDigestMD5Mechanism

      public SASLDigestMD5Mechanism()
  • Method Details

    • setVerifyServerResponse

      public static void setVerifyServerResponse(boolean verifyServerResponse)
    • authenticateInternal

      protected void authenticateInternal(CallbackHandler cbh)
      Specified by:
      authenticateInternal in class org.jivesoftware.smack.sasl.SASLMechanism
    • getAuthenticationText

      protected byte[] getAuthenticationText()
      Specified by:
      getAuthenticationText in class org.jivesoftware.smack.sasl.SASLMechanism
    • getName

      public String getName()
      Specified by:
      getName in class org.jivesoftware.smack.sasl.SASLMechanism
    • getPriority

      public int getPriority()
      Specified by:
      getPriority in class org.jivesoftware.smack.sasl.SASLMechanism
    • newInstance

      public SASLDigestMD5Mechanism newInstance()
      Specified by:
      newInstance in class org.jivesoftware.smack.sasl.SASLMechanism
    • authzidSupported

      public boolean authzidSupported()
      Overrides:
      authzidSupported in class org.jivesoftware.smack.sasl.SASLMechanism
    • checkIfSuccessfulOrThrow

      public void checkIfSuccessfulOrThrow() throws org.jivesoftware.smack.SmackException.SmackSaslException
      Specified by:
      checkIfSuccessfulOrThrow in class org.jivesoftware.smack.sasl.SASLMechanism
      Throws:
      org.jivesoftware.smack.SmackException.SmackSaslException
    • evaluateChallenge

      protected byte[] evaluateChallenge(byte[] challenge) throws org.jivesoftware.smack.SmackException.SmackSaslException
      Overrides:
      evaluateChallenge in class org.jivesoftware.smack.sasl.SASLMechanism
      Throws:
      org.jivesoftware.smack.SmackException.SmackSaslException
    • quoteBackslash

      public static String quoteBackslash(String string)
      Quote the backslash in the given String. Replaces all occurrences of "\" with "\\".

      According to RFC 2831 ยง 7.2 a quoted-string consists either of qdtext or quoted-pair. And since quoted-pair is a backslash followed by a char, every backslash in qdtext must be quoted, since it otherwise would be treated as qdtext.

      Parameters:
      string - the input string.
      Returns:
      the input string where the every backslash is quoted.