Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.http.security
Class PasswordDigest

    java.lang.Object
      |
      +--com.caucho.http.security.PasswordDigest

public class PasswordDigest
extends java.lang.Object

Extracts a digestified username/password from the request.

Constructor Summary
`PasswordDigest()`

Method Summary
`protected static java.lang.String` | `digestToBase64(byte[] digest, int len)`
`protected static java.lang.String` | `digestToHex(byte[] digest, int len)`
`protected java.lang.String` | `digestToString(byte[] digest, int len)`
`java.lang.String` | `getAlgorithm()` Returns the message digest algorithm.
`java.lang.String` | `getFormat()` Returns the message digest format (base64 or hex).
`java.lang.String` | `getPasswordDigest(HttpServletRequest request, HttpServletResponse response, ServletContext app, java.lang.String user, java.lang.String password)` Logs the user in with any appropriate password.
`java.lang.String` | `getPasswordDigest(java.lang.String user, java.lang.String password)` Logs the user in with any appropriate password.
`void` | `init()` Initialize the authenticator with the application.
`void` | `setAlgorithm(java.lang.String algorithm)` Returns the message digest algorithm.
`void` | `setFormat(java.lang.String format)` Set the message digest format (base64 or hex).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PasswordDigest

    public PasswordDigest()

Method Detail

### setAlgorithm

    public void setAlgorithm(java.lang.String algorithm)

  Returns the message digest algorithm.

### getAlgorithm

    public java.lang.String getAlgorithm()

  Returns the message digest algorithm.

### setFormat

    public void setFormat(java.lang.String format)

  Set the message digest format (base64 or hex).

### getFormat

    public java.lang.String getFormat()

  Returns the message digest format (base64 or hex).

### init

    public void init()
              throws ServletException

  Initialize the authenticator with the application.

### getPasswordDigest

    public java.lang.String getPasswordDigest(java.lang.String user,
                                              java.lang.String password)
                                       throws ServletException

  Logs the user in with any appropriate password.

### getPasswordDigest

    public java.lang.String getPasswordDigest(HttpServletRequest request,
                                              HttpServletResponse response,
                                              ServletContext app,
                                              java.lang.String user,
                                              java.lang.String password)
                                       throws ServletException

  Logs the user in with any appropriate password.

### digestToString

    protected java.lang.String digestToString(byte[] digest,
                                              int len)

### digestToBase64

    protected static java.lang.String digestToBase64(byte[] digest,
                                                     int len)

### digestToHex

    protected static java.lang.String digestToHex(byte[] digest,
                                                  int len)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD