KIO
#include <ksmimecrypto.h>
Public Types | |
enum | algo { KSC_C_DES3_CBC = 1, KSC_C_RC2_CBC_128, KSC_C_RC2_CBC_64, KSC_C_DES_CBC, KSC_C_RC2_CBC_40 } |
enum | rc { KSC_R_OK, KSC_R_OTHER, KSC_R_NO_SSL, KSC_R_NOCIPHER, KSC_R_NOMEM, KSC_R_FORMAT, KSC_R_WRONGKEY, KSC_R_VERIFY } |
Public Member Functions | |
KSMIMECrypto () | |
~KSMIMECrypto () | |
rc | checkDetachedSignature (const QByteArray &clearText, const QByteArray &signature, QList< KSSLCertificate * > &foundCerts) |
rc | checkOpaqueSignature (const QByteArray &signedText, QByteArray &clearText, QList< KSSLCertificate * > &foundCerts) |
rc | decryptMessage (const QByteArray &cipherText, QByteArray &clearText, const KSSLPKCS12 &privKey) |
rc | encryptMessage (const QByteArray &clearText, QByteArray &cipherText, algo algorithm, const QList< KSSLCertificate * > &recip) |
rc | signMessage (const QByteArray &clearText, QByteArray &cipherText, const KSSLPKCS12 &privKey, const QList< KSSLCertificate * > &certs, bool detached) |
Detailed Description
Definition at line 32 of file ksmimecrypto.h.
Member Enumeration Documentation
enum KSMIMECrypto::algo |
Enumerator | |
---|---|
KSC_C_DES3_CBC | |
KSC_C_RC2_CBC_128 | |
KSC_C_RC2_CBC_64 | |
KSC_C_DES_CBC | |
KSC_C_RC2_CBC_40 |
Definition at line 37 of file ksmimecrypto.h.
enum KSMIMECrypto::rc |
Enumerator | |
---|---|
KSC_R_OK | |
KSC_R_OTHER | |
KSC_R_NO_SSL | |
KSC_R_NOCIPHER | |
KSC_R_NOMEM | |
KSC_R_FORMAT | |
KSC_R_WRONGKEY | |
KSC_R_VERIFY |
Definition at line 43 of file ksmimecrypto.h.
Constructor & Destructor Documentation
KSMIMECrypto::KSMIMECrypto | ( | ) |
Definition at line 285 of file ksmimecrypto.cpp.
KSMIMECrypto::~KSMIMECrypto | ( | ) |
Definition at line 297 of file ksmimecrypto.cpp.
Member Function Documentation
KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature | ( | const QByteArray & | clearText, |
const QByteArray & | signature, | ||
QList< KSSLCertificate * > & | foundCerts | ||
) |
Check a detached message signature Will check if messages matches signature and extract certificates Does not check certificates for validity!
- Parameters
-
clearText MIME representation of signed message (without SIG) signature signature foundCerts certificates found in this message
- Returns
- 0 on success
Definition at line 331 of file ksmimecrypto.cpp.
KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature | ( | const QByteArray & | signedText, |
QByteArray & | clearText, | ||
QList< KSSLCertificate * > & | foundCerts | ||
) |
Check an opaque signed message Will check if signature matches and extract message Does not check certificates for validity!
- Parameters
-
signedText signed message block clearText cleartext of signed message foundCerts certificates found in this mesasge
- Returns
- 0 on success
Definition at line 351 of file ksmimecrypto.cpp.
KSMIMECrypto::rc KSMIMECrypto::decryptMessage | ( | const QByteArray & | cipherText, |
QByteArray & | clearText, | ||
const KSSLPKCS12 & | privKey | ||
) |
Decrypt a message.
- Parameters
-
cipherText encrypted message block clearText returns decrypted message privKey private key to use
- Returns
- 0 on success
Definition at line 400 of file ksmimecrypto.cpp.
KSMIMECrypto::rc KSMIMECrypto::encryptMessage | ( | const QByteArray & | clearText, |
QByteArray & | cipherText, | ||
algo | algorithm, | ||
const QList< KSSLCertificate * > & | recip | ||
) |
Encrypt a message encrypts a message for the given list of recipients and the selected algorithm.
Note that any algorithm <128 bytes is insecure and should never be used, even if SMIME-2 requires only RC2-40
- Parameters
-
clearText MIME representation of message to encrypt cipherText returned encrypted message algorithm encryption algorithm recip recipient certificates
- Returns
- 0 on success
Definition at line 375 of file ksmimecrypto.cpp.
KSMIMECrypto::rc KSMIMECrypto::signMessage | ( | const QByteArray & | clearText, |
QByteArray & | cipherText, | ||
const KSSLPKCS12 & | privKey, | ||
const QList< KSSLCertificate * > & | certs, | ||
bool | detached | ||
) |
Sign a message.
- Parameters
-
clearText MIME representation of the message (part) to sign cipherText signature to append or signature block privKey private key/certificate to sign with certs additional certificates (may be empty) detached create detached or opaque signature
- Returns
- 0 on success
Definition at line 304 of file ksmimecrypto.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.