Package com.sun.mail.smtp

## Class DigestMD5

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

    public class DigestMD5
    extends java.lang.Object

DIGEST-MD5 authentication support.

Author:
  Dean Gibson, Bill Shannon

### Constructor Summary

Constructors
`DigestMD5​(MailLogger logger)`

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `authClient​(java.lang.String host, java.lang.String user, java.lang.String passwd, java.lang.String realm, java.lang.String serverChallenge)` Return client's authentication response to server's challenge.
`boolean` `authServer​(java.lang.String serverResponse)` Allow the client to authenticate the server based on its response.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DigestMD5

    public DigestMD5​(MailLogger logger)

### Method Detail

#### authClient

    public byte[] authClient​(java.lang.String host,
                             java.lang.String user,
                             java.lang.String passwd,
                             java.lang.String realm,
                             java.lang.String serverChallenge)
                      throws java.io.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:
  `java.io.IOException` - for I/O errors

#### authServer

    public boolean authServer​(java.lang.String serverResponse)
                       throws java.io.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:
  `java.io.IOException` - for character conversion failures