.TH "KDESasl" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDESasl \- This library can create responses for SASL authentication for a given challenge and a given secret.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kdesasl.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDESasl\fP (const  \fBKURL\fP &aUrl)"
.br
.RI "\fIConstruct a sasl object and initialize it with the username and password passed via the url. \fP"
.ti -1c
.RI "\fBKDESasl\fP (const  \fBQString\fP &aUser, const  \fBQString\fP &aPass, const  \fBQString\fP &aProtocol)"
.br
.RI "\fIThis is a conveniece funtion and differs from the above function only by what arguments it accepts. \fP"
.ti -1c
.RI "virtual \fBQCString\fP \fBchooseMethod\fP (const  \fBQStrIList\fP aMethods)"
.br
.ti -1c
.RI "virtual void \fBsetMethod\fP (const  \fBQCString\fP &aMethod)"
.br
.RI "\fIExplicitely set the SASL method used. \fP"
.ti -1c
.RI "\fBQCString\fP \fBgetResponse\fP (const  \fBQByteArray\fP &aChallenge, bool aBase64=TRUE)"
.br
.RI "\fICreates a response using the formerly chosen SASL method. \fP"
.ti -1c
.RI "\fBQByteArray\fP \fBgetBinaryResponse\fP (const  \fBQByteArray\fP &aChallenge, bool aBase64)"
.br
.RI "\fICreate a response as above but place it in a \fBQByteArray\fP. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual \fBQByteArray\fP \fBgetPlainResponse\fP ()"
.br
.RI "\fIPLAIN authentication as described in RFC 2595. \fP"
.ti -1c
.RI "virtual \fBQByteArray\fP \fBgetLoginResponse\fP ()"
.br
.RI "\fILOGIN authentication. \fP"
.ti -1c
.RI "virtual \fBQByteArray\fP \fBgetCramMd5Response\fP (const  \fBQByteArray\fP &aChallenge)"
.br
.RI "\fICRAM-MD5 authentication as described in RFC 2195. \fP"
.ti -1c
.RI "virtual \fBQByteArray\fP \fBgetDigestMd5Response\fP (const  \fBQByteArray\fP &aChallenge)"
.br
.RI "\fIDIGEST-MD5 authentication as described in RFC 2831. \fP"
.in -1c
.SH "Detailed Description"
.PP 
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.
.PP
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.
.PP
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.
.PP
\fBAuthor:\fP
.RS 4
Michael Häckel <haeckel@kde.org> 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkdesasl.h\fP,v 1.7 2002/01/18 08:09:38 haeckel Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 47 of file kdesasl.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDESasl::KDESasl (const \fBKURL\fP & aUrl)"
.PP
Construct a sasl object and initialize it with the username and password passed via the url. Definition at line 26 of file kdesasl.cpp.
.PP
References KURL::pass(), KURL::protocol(), and KURL::user().
.SS "KDESasl::KDESasl (const \fBQString\fP & aUser, const \fBQString\fP & aPass, const \fBQString\fP & aProtocol)"
.PP
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.
.SH "Member Function Documentation"
.PP 
.SS "\fBQCString\fP KDESasl::chooseMethod (const \fBQStrIList\fP aMethods)\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
the most secure method from the given methods and use it for further operations. 
.RE
.PP
Definition at line 46 of file kdesasl.cpp.
.SS "void KDESasl::setMethod (const \fBQCString\fP & aMethod)\fC [virtual]\fP"
.PP
Explicitely set the SASL method used. Definition at line 56 of file kdesasl.cpp.
.SS "\fBQCString\fP KDESasl::getResponse (const \fBQByteArray\fP & aChallenge, bool aBase64 = TRUE)"
.PP
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. 
.PP
\fBParameters:\fP
.RS 4
\fIaChallenge\fP is the challenge sent to create a response for 
.br
\fIaBase64\fP specifies, whether the authentication protocol uses base64 encoding. The challenge is decoded from base64 and the response is encoded base64 if set to TRUE. 
.RE
.PP
Definition at line 251 of file kdesasl.cpp.
.PP
References getBinaryResponse().
.SS "\fBQByteArray\fP KDESasl::getBinaryResponse (const \fBQByteArray\fP & aChallenge, bool aBase64)"
.PP
Create a response as above but place it in a \fBQByteArray\fP. Definition at line 232 of file kdesasl.cpp.
.PP
References KCodecs::base64Decode(), KCodecs::base64Encode(), getCramMd5Response(), getDigestMd5Response(), getLoginResponse(), and getPlainResponse().
.PP
Referenced by getResponse().
.SS "\fBQByteArray\fP KDESasl::getPlainResponse ()\fC [protected, virtual]\fP"
.PP
PLAIN authentication as described in RFC 2595. Definition at line 61 of file kdesasl.cpp.
.PP
References QCString::length(), and QString::utf8().
.PP
Referenced by getBinaryResponse().
.SS "\fBQByteArray\fP KDESasl::getLoginResponse ()\fC [protected, virtual]\fP"
.PP
LOGIN authentication. Definition at line 73 of file kdesasl.cpp.
.PP
References QString::utf8().
.PP
Referenced by getBinaryResponse().
.SS "\fBQByteArray\fP KDESasl::getCramMd5Response (const \fBQByteArray\fP & aChallenge)\fC [protected, virtual]\fP"
.PP
CRAM-MD5 authentication as described in RFC 2195. Definition at line 81 of file kdesasl.cpp.
.PP
References KMD5::hexDigest(), KMD5::rawDigest(), KMD5::update(), and QString::utf8().
.PP
Referenced by getBinaryResponse().
.SS "\fBQByteArray\fP KDESasl::getDigestMd5Response (const \fBQByteArray\fP & aChallenge)\fC [protected, virtual]\fP"
.PP
DIGEST-MD5 authentication as described in RFC 2831. Definition at line 114 of file kdesasl.cpp.
.PP
References KCodecs::base64Encode(), KMD5::hexDigest(), QCString::isEmpty(), QString::latin1(), QCString::length(), KMD5::rawDigest(), KMD5::reset(), QCString::setNum(), KMD5::update(), and QString::utf8().
.PP
Referenced by getBinaryResponse().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
