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

swcipher.h

00001 /******************************************************************************
00002  *  swcipher.h   - definition of Class SWCipher used for data cipher/decipher
00003  *
00004  * $Id: swcipher_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
00005  *
00006  * Copyright 1999 CrossWire Bible Society (http://www.crosswire.org)
00007  *      CrossWire Bible Society
00008  *      P. O. Box 2528
00009  *      Tempe, AZ  85280-2528
00010  *
00011  * This program is free software; you can redistribute it and/or modify it
00012  * under the terms of the GNU General Public License as published by the
00013  * Free Software Foundation version 2.
00014  *
00015  * This program is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * General Public License for more details.
00019  *
00020  */
00021 
00022 #ifndef SWCIPHER_H
00023 #define SWCIPHER_H
00024 
00025 #include "sapphire.h"
00026 
00027 #include <defs.h>
00028 
00029 class SWDLLEXPORT SWCipher
00030 {
00031 
00032   sapphire master;
00033   sapphire work;
00034 
00035   char *buf;
00036   bool cipher;
00037   int len;
00038 protected:
00039 public:
00040     SWCipher (unsigned char *key);
00041   virtual void setCipherKey (const char *key);
00042     virtual ~ SWCipher ();
00043   virtual char *Buf (const char *buf = 0, unsigned int len = 0);
00044   virtual char *cipherBuf (unsigned int *len, const char *buf = 0);
00045   virtual void Encode (void);
00046   virtual void Decode (void);
00047 };
00048 
00049 #endif

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by doxygen1.2.15