• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

Public Types | Public Member Functions | List of all members
KSMIMECrypto Class Reference

#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
clearTextMIME representation of signed message (without SIG)
signaturesignature
foundCertscertificates 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
signedTextsigned message block
clearTextcleartext of signed message
foundCertscertificates 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
cipherTextencrypted message block
clearTextreturns decrypted message
privKeyprivate 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
clearTextMIME representation of message to encrypt
cipherTextreturned encrypted message
algorithmencryption algorithm
reciprecipient 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
clearTextMIME representation of the message (part) to sign
cipherTextsignature to append or signature block
privKeyprivate key/certificate to sign with
certsadditional certificates (may be empty)
detachedcreate 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:
  • ksmimecrypto.h
  • ksmimecrypto.cpp
This file is part of the KDE documentation.
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.

KIO

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal