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

KIO

ksmimecrypto.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002  *
00003  * Copyright (C) 2003 Stefan Rompf <sux@loplof.de>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef __KSMIMECRYPTO_H
00022 #define __KSMIMECRYPTO_H
00023 
00024 
00025 #include <QtCore/QList>
00026 #include "ksslpkcs12.h"
00027 #include "ksslcertificate.h"
00028 
00029 class KOpenSSLProxy;
00030 class KSMIMECryptoPrivate;
00031 
00032 class KIO_EXPORT KSMIMECrypto {
00033  public:
00034     KSMIMECrypto();
00035     ~KSMIMECrypto();
00036 
00037     enum algo { KSC_C_DES3_CBC = 1,
00038         KSC_C_RC2_CBC_128,
00039         KSC_C_RC2_CBC_64,
00040         KSC_C_DES_CBC,
00041         KSC_C_RC2_CBC_40 };
00042 
00043     enum rc { KSC_R_OK,        /* everything ok */
00044           KSC_R_OTHER,     /* unspecified error */
00045           KSC_R_NO_SSL,    /* No crypto lib / compiled without SSL */
00046           KSC_R_NOCIPHER,  /* encryption cipher n/a */
00047           KSC_R_NOMEM,     /* out of memory */
00048           KSC_R_FORMAT,    /* wrong input data format */
00049           KSC_R_WRONGKEY,  /* wrong decryption/signature key */
00050           KSC_R_VERIFY     /* data does not match signature */
00051     };
00052 
00062     rc signMessage(const QByteArray &clearText,
00063            QByteArray &cipherText,
00064            const KSSLPKCS12 &privKey,
00065            const QList<KSSLCertificate *> &certs,
00066            bool detached);
00067 
00077     rc checkDetachedSignature(const QByteArray &clearText,
00078                   const QByteArray &signature,
00079                   QList<KSSLCertificate *> &foundCerts);
00080 
00090     rc checkOpaqueSignature(const QByteArray &signedText,
00091                 QByteArray &clearText,
00092                 QList<KSSLCertificate *> &foundCerts);
00093 
00106     rc encryptMessage(const QByteArray &clearText,
00107               QByteArray &cipherText,
00108               algo algorithm,
00109               const QList<KSSLCertificate *> &recip);
00110 
00118     rc decryptMessage(const QByteArray &cipherText,
00119               QByteArray &clearText,
00120               const KSSLPKCS12 &privKey);
00121 
00122  private:
00123     KSMIMECryptoPrivate *priv;
00124     KOpenSSLProxy *kossl;
00125 };
00126 
00127 #endif

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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