VMime
SASLMechanism Class Referenceabstract
Inheritance diagram for SASLMechanism:
Collaboration diagram for SASLMechanism:

Public Member Functions

virtual const string getName () const =0
 
virtual bool step (shared_ptr< SASLSession > sess, const byte_t *challenge, const size_t challengeLen, byte_t **response, size_t *responseLen)=0
 
virtual bool isComplete () const =0
 
virtual bool hasInitialResponse () const =0
 
virtual void encode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen)=0
 
virtual void decode (shared_ptr< SASLSession > sess, const byte_t *input, const size_t inputLen, byte_t **output, size_t *outputLen)=0
 

Additional Inherited Members

- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

An SASL mechanism.

Member Function Documentation

virtual void decode ( shared_ptr< SASLSession sess,
const byte_t input,
const size_t  inputLen,
byte_t **  output,
size_t outputLen 
)
pure virtual

Decode data according to negotiated SASL mechanism.

This might mean that data is integrity or privacy protected.

Parameters
sessSASL session
inputinput buffer
inputLenlength of input buffer
outputoutput buffer (allocated bu the function, free with delete[])
outputLenlength of output buffer
Exceptions
exceptions::sasl_exceptionif an error occured during the encoding of data (in this case, the values in 'output' and 'outputLen' are undetermined)

Implemented in builtinSASLMechanism.

virtual void encode ( shared_ptr< SASLSession sess,
const byte_t input,
const size_t  inputLen,
byte_t **  output,
size_t outputLen 
)
pure virtual

Encode data according to negotiated SASL mechanism.

This might mean that data is integrity or privacy protected.

Parameters
sessSASL session
inputinput buffer
inputLenlength of input buffer
outputoutput buffer (allocated bu the function, free with delete[])
outputLenlength of output buffer
Exceptions
exceptions::sasl_exceptionif an error occured during the encoding of data (in this case, the values in 'output' and 'outputLen' are undetermined)

Implemented in builtinSASLMechanism.

virtual const string getName ( ) const
pure virtual

Return the name of this mechanism.

Returns
mechanism name

Implemented in builtinSASLMechanism.

virtual bool hasInitialResponse ( ) const
pure virtual

Determine if this mechanism has an optional initial response.

If true, caller should call step() with an empty challenge to get the initial response.

Returns
true if this mechanism has an initial response, or false otherwise

Implemented in builtinSASLMechanism.

virtual bool isComplete ( ) const
pure virtual

Check whether authentication has completed.

If false, more calls to evaluateChallenge() are needed to complete the authentication process).

Returns
true if the authentication has finished, or false otherwise

Implemented in builtinSASLMechanism.

virtual bool step ( shared_ptr< SASLSession sess,
const byte_t challenge,
const size_t  challengeLen,
byte_t **  response,
size_t responseLen 
)
pure virtual

Perform one step of SASL authentication.

Accept data from the server (challenge), process it and return data to be returned in response to the server.

If the challenge is empty (challengeLen == 0), the initial response is returned, if this mechanism has one.

Parameters
sessSASL session
challengechallenge sent from the server
challengeLenlength of challenge
responseresponse to send to the server (allocated by this function, free with delete[])
responseLenlength of response buffer
Returns
true if authentication terminated successfully, or false if the authentication process should continue
Exceptions
exceptions::sasl_exceptionif an error occured during authentication (in this case, the values in 'response' and 'responseLen' are undetermined)

Implemented in builtinSASLMechanism.


The documentation for this class was generated from the following file: