Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Des.h

Go to the documentation of this file.
00001 #ifndef __DES_H__
00002 #define __DES_H__
00003 
00004 #include <openssl/rsa.h>
00005 #include <openssl/crypto.h>
00006 #include <openssl/x509.h>
00007 #include <openssl/pem.h>
00008 #include <openssl/ssl.h>
00009 #include <openssl/err.h>
00010 #include <openssl/rand.h>
00011 #include <openssl/x509v3.h>
00012 
00013 class Des
00014 {
00015 public:
00016 #define DES_BLOCK_SIZE sizeof(des_cblock)
00017 
00018     static const int blockSize; 
00019 
00020     static void generateRandomKey(unsigned char* key_buff);
00021 
00022     Des ();
00023     ~Des ();
00024 
00025     bool setKey(unsigned char* key);
00026     
00027     int encrypt(unsigned char* in, int inlen, unsigned char* out);
00028 
00029     int decrypt(unsigned char* in, int inlen, unsigned char* out);    
00030 
00031 private:
00032     des_key_schedule m_schedule;
00033 };
00034 
00035 #endif //__DES_H__

Generated at Thu Jul 11 13:31:50 2002 for Peekabooty by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001