• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KSMIMECrypto Class Reference

#include <ksmimecrypto.h>

List of all members.


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

rc checkDetachedSignature (const QCString &clearText, const QByteArray &signature, QPtrList< KSSLCertificate > &foundCerts)
rc checkOpaqueSignature (const QByteArray &signedText, QCString &clearText, QPtrList< KSSLCertificate > &foundCerts)
rc decryptMessage (const QByteArray &cipherText, QCString &clearText, const KSSLPKCS12 &privKey)
rc encryptMessage (const QCString &clearText, QByteArray &cipherText, algo algorithm, const QPtrList< KSSLCertificate > &recip)
 KSMIMECrypto ()
rc signMessage (const QCString &clearText, QByteArray &cipherText, const KSSLPKCS12 &privKey, const QPtrList< KSSLCertificate > &certs, bool detached)
 ~KSMIMECrypto ()

Detailed Description

Definition at line 33 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 38 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 44 of file ksmimecrypto.h.


Constructor & Destructor Documentation

KSMIMECrypto::KSMIMECrypto (  ) 

Definition at line 288 of file ksmimecrypto.cc.

KSMIMECrypto::~KSMIMECrypto (  ) 

Definition at line 299 of file ksmimecrypto.cc.


Member Function Documentation

KSMIMECrypto::rc KSMIMECrypto::checkDetachedSignature ( const QCString &  clearText,
const QByteArray &  signature,
QPtrList< 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 333 of file ksmimecrypto.cc.

KSMIMECrypto::rc KSMIMECrypto::checkOpaqueSignature ( const QByteArray &  signedText,
QCString &  clearText,
QPtrList< 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 353 of file ksmimecrypto.cc.

KSMIMECrypto::rc KSMIMECrypto::decryptMessage ( const QByteArray &  cipherText,
QCString &  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 402 of file ksmimecrypto.cc.

KSMIMECrypto::rc KSMIMECrypto::encryptMessage ( const QCString &  clearText,
QByteArray &  cipherText,
algo  algorithm,
const QPtrList< 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 377 of file ksmimecrypto.cc.

KSMIMECrypto::rc KSMIMECrypto::signMessage ( const QCString &  clearText,
QByteArray &  cipherText,
const KSSLPKCS12 &  privKey,
const QPtrList< 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 306 of file ksmimecrypto.cc.


The documentation for this class was generated from the following files:
  • ksmimecrypto.h
  • ksmimecrypto.cc

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal