xrootd
PC1.hh
Go to the documentation of this file.
1 // $Id$
2 /* ----------------------------------------------------------------------- *
3  * *
4  * PC1.hh *
5  * *
6  * *
7  * C++ adaptation of PC1 implementation written by Alexander PUKALL 1991. *
8  * *
9  * Reference: http://membres.lycos.fr/pc1/ *
10  * *
11  * Description: *
12  * PC1 Cipher Algorithm (Pukall Cipher 1) for encryption/decryption. *
13  * One-way hash for password encryption also provided. *
14  * *
15  * Key length is 256 bits *
16  * *
17  * Free code no restriction to use please include the name of the Author *
18  * in the final software *
19  * Tested with Turbo C 2.0 for DOS and Microsoft Visual C++ 5.0 for Win 32 *
20  * *
21  * Adapted by G. Ganis (g.ganis@cern.ch), January 2005 *
22  * ----------------------------------------------------------------------- */
23 
24 // Basic length (of key, output hash, ...) in bytes
25 #define kPC1LENGTH 32
26 
27 //
28 // Encode / Decode functions
29 int PC1Encrypt(const char *, int, const char *, int, char *);
30 int PC1Decrypt(const char *, int, const char *, int, char *);
31 
32 //
33 // One-way hash
34 int PC1HashFun(const char *, int, const char *, int, int, char *);