Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

krc2.h

Go to the documentation of this file.
00001 /*
00002 ** $Id: krc2.h,v 1.1.1.1 2003/07/22 19:23:17 zcarsten Exp $
00003 */
00004 
00005 #ifndef _KRC2_H_
00006 #define _KRC2_H_
00007 
00008 /* Header file for rc2 implementation by Matthew Palmer <mjp16@uow.edu.au> */
00009 
00010 class Krc2
00011 {
00012 public:
00013         Krc2();
00014         ~Krc2();
00015 
00016         /* Externally worked functions */
00017         void rc2_expandkey(char key[], int length, int ekl);
00018         void rc2_encrypt(unsigned short *input);
00019         void rc2_decrypt(unsigned short *input);
00020 
00021 private:
00022         /* The internals */
00023         void _rc2_mix(unsigned short *input);
00024         void _rc2_mash(unsigned short *input);
00025         void _rc2_rmix(unsigned short *input);
00026         void _rc2_rmash(unsigned short *input);
00027         int _rc2_pow(int base, int exponent);
00028         unsigned short _rc2_ror(unsigned short input, int places);
00029         unsigned short _rc2_rol(unsigned short input, int places);
00030 
00031 };
00032 #endif // _KRC2_H_
00033 
00034 
00035 

Generated on Sat Nov 5 16:17:14 2005 for OPIE by  doxygen 1.4.2