• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/kssl
 

tdeio/kssl

ksmimecrypto.h
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 <tqcstring.h>
00026 #include <tqptrlist.h>
00027 #include "ksslpkcs12.h"
00028 #include "ksslcertificate.h"
00029 
00030 class KOpenSSLProxy;
00031 class KSMIMECryptoPrivate;
00032 
00033 class TDEIO_EXPORT KSMIMECrypto {
00034  public:
00035     KSMIMECrypto();
00036     ~KSMIMECrypto();
00037 
00038     enum algo { KSC_C_DES3_CBC = 1,
00039         KSC_C_RC2_CBC_128,
00040         KSC_C_RC2_CBC_64,
00041         KSC_C_DES_CBC,
00042         KSC_C_RC2_CBC_40 };
00043 
00044     enum rc { KSC_R_OK,        /* everything ok */
00045           KSC_R_OTHER,     /* unspecified error */
00046           KSC_R_NO_SSL,    /* No crypto lib / compiled without SSL */
00047           KSC_R_NOCIPHER,  /* encryption cipher n/a */
00048           KSC_R_NOMEM,     /* out of memory */
00049           KSC_R_FORMAT,    /* wrong input data format */
00050           KSC_R_WRONGKEY,  /* wrong decryption/signature key */
00051           KSC_R_VERIFY     /* data does not match signature */
00052     };
00053 
00063     rc signMessage(const TQCString &clearText,
00064            TQByteArray &cipherText,
00065            const KSSLPKCS12 &privKey,
00066            const TQPtrList<KSSLCertificate> &certs,
00067            bool detached);
00068 
00078     rc checkDetachedSignature(const TQCString &clearText,
00079                   const TQByteArray &signature,
00080                   TQPtrList<KSSLCertificate> &foundCerts);
00081 
00091     rc checkOpaqueSignature(const TQByteArray &signedText,
00092                 TQCString &clearText,
00093                 TQPtrList<KSSLCertificate> &foundCerts);
00094     
00107     rc encryptMessage(const TQCString &clearText,
00108               TQByteArray &cipherText,
00109               algo algorithm,
00110               const TQPtrList<KSSLCertificate> &recip);
00111 
00119     rc decryptMessage(const TQByteArray &cipherText,
00120               TQCString &clearText,
00121               const KSSLPKCS12 &privKey);
00122 
00123  private:
00124     KSMIMECryptoPrivate *priv;
00125     KOpenSSLProxy *kossl;
00126 };
00127 
00128 #endif

tdeio/kssl

Skip menu "tdeio/kssl"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/kssl

Skip menu "tdeio/kssl"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/kssl by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.