diff options
Diffstat (limited to 'src/daemon/https/lgl/des.h')
-rw-r--r-- | src/daemon/https/lgl/des.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/daemon/https/lgl/des.h b/src/daemon/https/lgl/des.h index 4d9eb20c..d2ad058e 100644 --- a/src/daemon/https/lgl/des.h +++ b/src/daemon/https/lgl/des.h | |||
@@ -62,12 +62,14 @@ extern void MHD_gl_des_setkey (MHD_gl_des_ctx * ctx, const char *key); | |||
62 | /* Fill a DES context CTX with subkeys calculated from 64bit KEY, with | 62 | /* Fill a DES context CTX with subkeys calculated from 64bit KEY, with |
63 | * weak key checking. Does not check parity bits, but simply ignore | 63 | * weak key checking. Does not check parity bits, but simply ignore |
64 | * them. */ | 64 | * them. */ |
65 | extern bool MHD_gl_des_makekey (MHD_gl_des_ctx * ctx, const char *key, size_t keylen); | 65 | extern bool MHD_gl_des_makekey (MHD_gl_des_ctx * ctx, const char *key, |
66 | size_t keylen); | ||
66 | 67 | ||
67 | /* Electronic Codebook Mode DES encryption/decryption of data | 68 | /* Electronic Codebook Mode DES encryption/decryption of data |
68 | * according to 'mode'. */ | 69 | * according to 'mode'. */ |
69 | extern void | 70 | extern void |
70 | MHD_gl_des_ecb_crypt (MHD_gl_des_ctx * ctx, const char *from, char *to, int mode); | 71 | MHD_gl_des_ecb_crypt (MHD_gl_des_ctx * ctx, const char *from, char *to, |
72 | int mode); | ||
71 | 73 | ||
72 | #define MHD_gl_des_ecb_encrypt(ctx, from, to) MHD_gl_des_ecb_crypt(ctx, from, to, 0) | 74 | #define MHD_gl_des_ecb_encrypt(ctx, from, to) MHD_gl_des_ecb_crypt(ctx, from, to, 0) |
73 | #define MHD_gl_des_ecb_decrypt(ctx, from, to) MHD_gl_des_ecb_crypt(ctx, from, to, 1) | 75 | #define MHD_gl_des_ecb_decrypt(ctx, from, to) MHD_gl_des_ecb_crypt(ctx, from, to, 1) |
@@ -80,7 +82,8 @@ MHD_gl_des_ecb_crypt (MHD_gl_des_ctx * ctx, const char *from, char *to, int mode | |||
80 | * 64bit keys in KEY1 and KEY2. Does not check the parity bits of the | 82 | * 64bit keys in KEY1 and KEY2. Does not check the parity bits of the |
81 | * keys, but simply ignore them. Does not check for weak keys. */ | 83 | * keys, but simply ignore them. Does not check for weak keys. */ |
82 | extern void | 84 | extern void |
83 | MHD_gl_3des_set2keys (MHD_gl_3des_ctx * ctx, const char *key1, const char *key2); | 85 | MHD_gl_3des_set2keys (MHD_gl_3des_ctx * ctx, const char *key1, |
86 | const char *key2); | ||
84 | 87 | ||
85 | /* | 88 | /* |
86 | * Fill a Triple-DES context CTX with subkeys calculated from three | 89 | * Fill a Triple-DES context CTX with subkeys calculated from three |
@@ -89,7 +92,7 @@ MHD_gl_3des_set2keys (MHD_gl_3des_ctx * ctx, const char *key1, const char *key2) | |||
89 | * keys. */ | 92 | * keys. */ |
90 | extern void | 93 | extern void |
91 | MHD_gl_3des_set3keys (MHD_gl_3des_ctx * ctx, | 94 | MHD_gl_3des_set3keys (MHD_gl_3des_ctx * ctx, |
92 | const char *key1, const char *key2, const char *key3); | 95 | const char *key1, const char *key2, const char *key3); |
93 | 96 | ||
94 | /* Fill a Triple-DES context CTX with subkeys calculated from three | 97 | /* Fill a Triple-DES context CTX with subkeys calculated from three |
95 | * concatenated 64bit keys in KEY, with weak key checking. Does not | 98 | * concatenated 64bit keys in KEY, with weak key checking. Does not |
@@ -101,7 +104,8 @@ MHD_gl_3des_makekey (MHD_gl_3des_ctx * ctx, const char *key, size_t keylen); | |||
101 | * according to 'mode'. Sometimes this mode is named 'EDE' mode | 104 | * according to 'mode'. Sometimes this mode is named 'EDE' mode |
102 | * (Encryption-Decryption-Encryption). */ | 105 | * (Encryption-Decryption-Encryption). */ |
103 | extern void | 106 | extern void |
104 | MHD_gl_3des_ecb_crypt (MHD_gl_3des_ctx * ctx, const char *from, char *to, int mode); | 107 | MHD_gl_3des_ecb_crypt (MHD_gl_3des_ctx * ctx, const char *from, char *to, |
108 | int mode); | ||
105 | 109 | ||
106 | #define MHD_gl_3des_ecb_encrypt(ctx, from, to) MHD_gl_3des_ecb_crypt(ctx,from,to,0) | 110 | #define MHD_gl_3des_ecb_encrypt(ctx, from, to) MHD_gl_3des_ecb_crypt(ctx,from,to,0) |
107 | #define MHD_gl_3des_ecb_decrypt(ctx, from, to) MHD_gl_3des_ecb_crypt(ctx,from,to,1) | 111 | #define MHD_gl_3des_ecb_decrypt(ctx, from, to) MHD_gl_3des_ecb_crypt(ctx,from,to,1) |