Class DigestMD5

java.lang.Object
com.sun.mail.smtp.DigestMD5

public class DigestMD5 extends Object
DIGEST-MD5 authentication support.
Author:
Dean Gibson, Bill Shannon
  • Constructor Details

  • Method Details

    • authClient

      public byte[] authClient(String host, String user, String passwd, String realm, String serverChallenge) throws IOException
      Return client's authentication response to server's challenge.
      Parameters:
      host - the host name
      user - the user name
      passwd - the user's password
      realm - the security realm
      serverChallenge - the challenge from the server
      Returns:
      byte array with client's response
      Throws:
      IOException - for I/O errors
    • authServer

      public boolean authServer(String serverResponse) throws IOException
      Allow the client to authenticate the server based on its response.
      Parameters:
      serverResponse - the response that was received from the server
      Returns:
      true if server is authenticated
      Throws:
      IOException - for character conversion failures