KDESasl Class Reference
This library can create responses for SASL authentication for a given challenge and a given secret. More...
#include <kdesasl.h>
Public Member Functions | |
KDESasl (const KURL &aUrl) | |
Construct a sasl object and initialize it with the username and password passed via the url. | |
KDESasl (const QString &aUser, const QString &aPass, const QString &aProtocol) | |
This is a conveniece funtion and differs from the above function only by what arguments it accepts. | |
virtual QCString | chooseMethod (const QStrIList aMethods) |
virtual void | setMethod (const QCString &aMethod) |
Explicitely set the SASL method used. | |
QCString | getResponse (const QByteArray &aChallenge, bool aBase64=TRUE) |
Creates a response using the formerly chosen SASL method. | |
QByteArray | getBinaryResponse (const QByteArray &aChallenge, bool aBase64) |
Create a response as above but place it in a QByteArray. | |
Protected Member Functions | |
virtual QByteArray | getPlainResponse () |
PLAIN authentication as described in RFC 2595. | |
virtual QByteArray | getLoginResponse () |
LOGIN authentication. | |
virtual QByteArray | getCramMd5Response (const QByteArray &aChallenge) |
CRAM-MD5 authentication as described in RFC 2195. | |
virtual QByteArray | getDigestMd5Response (const QByteArray &aChallenge) |
DIGEST-MD5 authentication as described in RFC 2831. |
Detailed Description
This library can create responses for SASL authentication for a given challenge and a given secret.This way of authentication is common for SMTP, POP3, IMAP and LDAP.
SASL is one way strong encryption and therefore useful for authentication, but not for secret information transfer. It is possibly to prove with SASL to know a shared secret like a password. It is not possible with SASL to transfer any other information in an encrypted way. For that purpose OpenPGP or SSL are useful.
Currently PLAIN (RFC 2595), LOGIN, CRAM-MD5 (RFC 2195) and DIGEST-MD5 (RFC 2831) authentication are supported. PLAIN and LOGIN do only use encoding and not encryption.
- Author:
- Michael Häckel <haeckel@kde.org>
- Version:
- Id
- kdesasl.h,v 1.7 2002/01/18 08:09:38 haeckel Exp
Definition at line 47 of file kdesasl.h.
Constructor & Destructor Documentation
|
Construct a sasl object and initialize it with the username and password passed via the url.
Definition at line 26 of file kdesasl.cpp. References KURL::pass(), KURL::protocol(), and KURL::user(). |
|
This is a conveniece funtion and differs from the above function only by what arguments it accepts.
Definition at line 34 of file kdesasl.cpp. |
Member Function Documentation
|
Definition at line 46 of file kdesasl.cpp. |
|
Explicitely set the SASL method used.
Definition at line 56 of file kdesasl.cpp. |
|
Creates a response using the formerly chosen SASL method. For LOGIN authentication you have to call this function twice. KDESasl realizes on its own, if you are calling it for the first or for the second time.
Definition at line 251 of file kdesasl.cpp. References getBinaryResponse(). |
|
Create a response as above but place it in a QByteArray.
Definition at line 232 of file kdesasl.cpp. References KCodecs::base64Decode(), KCodecs::base64Encode(), getCramMd5Response(), getDigestMd5Response(), getLoginResponse(), and getPlainResponse(). Referenced by getResponse(). |
|
PLAIN authentication as described in RFC 2595.
Definition at line 61 of file kdesasl.cpp. References QCString::length(), and QString::utf8(). Referenced by getBinaryResponse(). |
|
LOGIN authentication.
Definition at line 73 of file kdesasl.cpp. References QString::utf8(). Referenced by getBinaryResponse(). |
|
CRAM-MD5 authentication as described in RFC 2195.
Definition at line 81 of file kdesasl.cpp. References KMD5::hexDigest(), KMD5::rawDigest(), KMD5::update(), and QString::utf8(). Referenced by getBinaryResponse(). |
|
DIGEST-MD5 authentication as described in RFC 2831.
Definition at line 114 of file kdesasl.cpp. References KCodecs::base64Encode(), KMD5::hexDigest(), QCString::isEmpty(), QString::latin1(), QCString::length(), KMD5::rawDigest(), KMD5::reset(), QCString::setNum(), KMD5::update(), and QString::utf8(). Referenced by getBinaryResponse(). |
The documentation for this class was generated from the following files: