projects/aports·blob master · refs

49 lines · 1.6 KiB

1diff --git a/modules/algorithms/des.c b/modules/algorithms/des.c
2index 5810811..2ce51a8 100644
3--- a/modules/algorithms/des.c
4+++ b/modules/algorithms/des.c
5@@ -35,9 +35,12 @@
6
7 /* #define NULL 0 */
8
9-static void permute_ip(), permute_fp(), perminit_ip(), spinit(),
10-perminit_fp();
11-static word32 f();
12+static void permute_ip(char *inblock, DES_KEY * key, char *outblock);
13+static void permute_fp(char *inblock, DES_KEY * key, char *outblock);
14+static void perminit_ip(DES_KEY * key);
15+static void spinit(DES_KEY * key);
16+static void perminit_fp(DES_KEY * key);
17+static word32 f(DES_KEY * key, register word32 r, register char *subkey);
18
19
20 /* Tables defined in the Data Encryption Standard documents */
21diff --git a/modules/algorithms/tripledes.c b/modules/algorithms/tripledes.c
22index 7b3c324..8a8d8a7 100644
23--- a/modules/algorithms/tripledes.c
24+++ b/modules/algorithms/tripledes.c
25@@ -36,8 +36,11 @@
26
27 /* #define NULL 0 */
28
29-static void permute(), perminit(), spinit();
30-static word32 f();
31+static void permute(char *inblock, char perm[16][16][8], char *outblock);
32+static void perminit(char perm[16][16][8], char p[64]);
33+static void spinit(TRIPLEDES_KEY * key, int pos);
34+static word32 f(TRIPLEDES_KEY * key, int pos, register word32 r,
35+ register char *subkey);
36
37
38 /* Tables defined in the Data Encryption Standard documents */
39@@ -199,8 +202,8 @@ static int _mcrypt_desinit(TRIPLEDES_KEY * key)
40 spinit(key, 0);
41 spinit(key, 1);
42 spinit(key, 2);
43- perminit(&key->iperm, ip);
44- perminit(&key->fperm, fp);
45+ perminit(key->iperm, ip);
46+ perminit(key->fperm, fp);
47
48
49 return 0;