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