1 #include <stddef.h> 2 #include <string.h> 3 typedef unsigned char des_cblock[8]; 4 5 void 6 des_fcrypt( 7 const char *password, 8 size_t passwordlen, 9 const char *salt, 10 size_t saltlen, 11 char *outbuf); 12 13 void 14 crypt_rounds( 15 des_cblock key, 16 unsigned long nrounds, 17 unsigned long saltnum, 18 des_cblock block); 19 20 void 21 trad_password_to_key( 22 des_cblock key, 23 const char *password, 24 size_t passwordlen); 25 26 void 27 ext_password_to_key( 28 des_cblock key, 29 const char *password, 30 size_t passwordlen); 31 32 void 33 base64_to_block( 34 des_cblock block, 35 const char *base64); 36 37 void 38 block_to_base64( 39 des_cblock block, 40 char *base64); 41 42 void 43 int24_to_base64( 44 unsigned long val, 45 char *base64); 46 47 unsigned long 48 base64_to_int24( 49 const char *base64); 50 51 void 52 int12_to_base64( 53 unsigned long val, 54 char *base64); 55 56 unsigned long 57 base64_to_int12( 58 const char *base64); 59