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

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kssl
ksmimecrypto.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2003 Stefan Rompf <sux@loplof.de>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef __KSMIMECRYPTO_H
22 #define __KSMIMECRYPTO_H
23 
24 
25 #include <QtCore/QList>
26 #include "ksslpkcs12.h"
27 #include "ksslcertificate.h"
28 
29 class KOpenSSLProxy;
30 class KSMIMECryptoPrivate;
31 
32 class KIO_EXPORT KSMIMECrypto {
33  public:
34  KSMIMECrypto();
35  ~KSMIMECrypto();
36 
37  enum algo { KSC_C_DES3_CBC = 1,
38  KSC_C_RC2_CBC_128,
39  KSC_C_RC2_CBC_64,
40  KSC_C_DES_CBC,
41  KSC_C_RC2_CBC_40 };
42 
43  enum rc { KSC_R_OK, /* everything ok */
44  KSC_R_OTHER, /* unspecified error */
45  KSC_R_NO_SSL, /* No crypto lib / compiled without SSL */
46  KSC_R_NOCIPHER, /* encryption cipher n/a */
47  KSC_R_NOMEM, /* out of memory */
48  KSC_R_FORMAT, /* wrong input data format */
49  KSC_R_WRONGKEY, /* wrong decryption/signature key */
50  KSC_R_VERIFY /* data does not match signature */
51  };
52 
62  rc signMessage(const QByteArray &clearText,
63  QByteArray &cipherText,
64  const KSSLPKCS12 &privKey,
65  const QList<KSSLCertificate *> &certs,
66  bool detached);
67 
77  rc checkDetachedSignature(const QByteArray &clearText,
78  const QByteArray &signature,
79  QList<KSSLCertificate *> &foundCerts);
80 
90  rc checkOpaqueSignature(const QByteArray &signedText,
91  QByteArray &clearText,
92  QList<KSSLCertificate *> &foundCerts);
93 
106  rc encryptMessage(const QByteArray &clearText,
107  QByteArray &cipherText,
108  algo algorithm,
109  const QList<KSSLCertificate *> &recip);
110 
118  rc decryptMessage(const QByteArray &cipherText,
119  QByteArray &clearText,
120  const KSSLPKCS12 &privKey);
121 
122  private:
123  KSMIMECryptoPrivate *priv;
124  KOpenSSLProxy *kossl;
125 };
126 
127 #endif
KSMIMECrypto::algo
algo
Definition: ksmimecrypto.h:37
KSMIMECrypto::KSC_C_DES_CBC
Definition: ksmimecrypto.h:40
ksslcertificate.h
KSMIMECrypto::KSC_R_NOCIPHER
Definition: ksmimecrypto.h:46
KSMIMECrypto::KSC_R_NOMEM
Definition: ksmimecrypto.h:47
KOpenSSLProxy
Dynamically load and wrap OpenSSL.
Definition: kopenssl.h:65
KSSLPKCS12
KDE PKCS#12 Certificate.
Definition: ksslpkcs12.h:63
KSMIMECrypto::KSC_R_OTHER
Definition: ksmimecrypto.h:44
KSMIMECrypto::KSC_R_FORMAT
Definition: ksmimecrypto.h:48
KSMIMECrypto::rc
rc
Definition: ksmimecrypto.h:43
KSMIMECrypto::KSC_C_RC2_CBC_128
Definition: ksmimecrypto.h:38
KSMIMECrypto::KSC_R_NO_SSL
Definition: ksmimecrypto.h:45
KSMIMECrypto::KSC_C_RC2_CBC_64
Definition: ksmimecrypto.h:39
ksslpkcs12.h
KSMIMECrypto
Definition: ksmimecrypto.h:32
KSMIMECrypto::KSC_R_OK
Definition: ksmimecrypto.h:43
KSMIMECrypto::KSC_R_WRONGKEY
Definition: ksmimecrypto.h:49
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 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