PC1.hh

Go to the documentation of this file.
00001 // $Id: PC1.hh 22437 2008-03-04 14:35:16Z rdm $
00002 /* ----------------------------------------------------------------------- *
00003  *                                                                         *
00004  * PC1.hh                                                                  *
00005  *                                                                         *
00006  *                                                                         *
00007  * C++ adaptation of PC1 implementation written by Alexander PUKALL 1991.  *
00008  *                                                                         *
00009  * Reference:  http://membres.lycos.fr/pc1/                                *
00010  *                                                                         *
00011  * Description:                                                            *
00012  * PC1 Cipher Algorithm (Pukall Cipher 1) for encryption/decryption.       *
00013  * One-way hash for password encryption also provided.                     *
00014  *                                                                         *
00015  * Key length is 256 bits                                                  *
00016  *                                                                         *
00017  * Free code no restriction to use please include the name of the Author   *
00018  * in the final software                                                   *
00019  * Tested with Turbo C 2.0 for DOS and Microsoft Visual C++ 5.0 for Win 32 *
00020  *                                                                         *
00021  * Adapted by G. Ganis (g.ganis@cern.ch), January 2005                     *
00022  * ----------------------------------------------------------------------- */
00023 
00024 // Basic length (of key, output hash, ...) in bytes
00025 #define kPC1LENGTH 32
00026 
00027 //
00028 // Encode / Decode functions
00029 int PC1Encrypt(const char *, int, const char *, int, char *);
00030 int PC1Decrypt(const char *, int, const char *, int, char *);
00031 
00032 //
00033 // One-way hash
00034 int PC1HashFun(const char *, int, const char *, int, int, char *);

Generated on Tue Jul 5 14:46:32 2011 for ROOT_528-00b_version by  doxygen 1.5.1