CramMD5Client (GNU cryptographic primitives and tools)
Keywords: gnu.crypto.sasl.crammd5.CramMD5Client,CramMD5Client class

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.crypto.sasl.crammd5
Class CramMD5Client

    java.lang.Object
      |
      +--gnu.crypto.sasl.ClientMechanism
            |
            +--gnu.crypto.sasl.crammd5.CramMD5Client

All Implemented Interfaces:
  SaslClient

public class CramMD5Client
extends ClientMechanism
implements SaslClient

The CRAM-MD5 SASL client-side mechanism.

Field Summary

Fields inherited from class gnu.crypto.sasl.ClientMechanism
`authorizationID, channelBinding, complete, handler, mechanism, properties, protocol, serverName, state`

Constructor Summary
`CramMD5Client()`

Method Summary
`byte[]` | `evaluateChallenge(byte[] challenge)` Evaluates the challenge data and generates a response.
`protected java.lang.String` | `getNegotiatedQOP()`
`boolean` | `hasInitialResponse()` Determines if this mechanism has an optional initial response.
`protected void` | `initMechanism()`
`protected void` | `resetMechanism()`

Methods inherited from class gnu.crypto.sasl.ClientMechanism
`dispose, engineUnwrap, engineWrap, getAuthorizationID, getMechanismName, getNegotiatedMaxBuffer, getNegotiatedPolicyForwardSecrecy, getNegotiatedPolicyNoActive, getNegotiatedPolicyNoAnonymous, getNegotiatedPolicyNoDictionary, getNegotiatedPolicyNoPlainText, getNegotiatedPolicyPassCredentials, getNegotiatedProperty, getNegotiatedRawSendSize, getNegotiatedServerAuth, getNegotiatedStrength, getReuse, init, isComplete, reset, unwrap, wrap`

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

Methods inherited from interface javax.security.sasl.SaslClient
`dispose, getMechanismName, getNegotiatedProperty, isComplete, unwrap, wrap`

Constructor Detail

### CramMD5Client

    public CramMD5Client()

Method Detail

### initMechanism

    protected void initMechanism()
                          throws SaslException

  Specified by:
    `initMechanism` in class `ClientMechanism`
    `SaslException`

### resetMechanism

    protected void resetMechanism()
                           throws SaslException

  Specified by:
    `resetMechanism` in class `ClientMechanism`
    `SaslException`

### hasInitialResponse

    public boolean hasInitialResponse()

  Description copied from interface: `SaslClient`
  Determines if this mechanism has an optional initial response. If `true`, caller should call `SaslClient.evaluateChallenge(byte[])` with an empty array to get the initial response.

  Specified by:
    `hasInitialResponse` in interface `SaslClient`
  Specified by:
    `hasInitialResponse` in class `ClientMechanism`
  Returns:
    `true` if this mechanism has an initial response.

### evaluateChallenge

    public byte[] evaluateChallenge(byte[] challenge)
                             throws SaslException

  Description copied from interface: `SaslClient`
  Evaluates the challenge data and generates a response. If a challenge is received from the server during the authentication process, this method is called to prepare an appropriate next response to submit to the server.

  Specified by:
    `evaluateChallenge` in interface `SaslClient`
  Specified by:
    `evaluateChallenge` in class `ClientMechanism`
  Parameters:
    `challenge` - the non-null challenge sent from the server. The challenge array may have zero length.
  Returns:
    the possibly `null` reponse to send to the server. It is `null` if the challenge accompanied a "SUCCESS" status and the challenge only contains data for the client to update its state and no response needs to be sent to the server. The response is a zero-length byte array if the client is to send a response with no data.
  Throws:
    `SaslException` - if an error occurred while processing the challenge or generating a response.

### getNegotiatedQOP

    protected java.lang.String getNegotiatedQOP()

  Overrides:
    `getNegotiatedQOP` in class `ClientMechanism`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.