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.
-
-
Constructor Summary
Constructors Constructor Description DigestMD5(MailLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 nameuser
- the user namepasswd
- the user's passwordrealm
- the security realmserverChallenge
- 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
-
-