mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-12 04:02:19 +01:00
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
diff --git a/modules/algorithms/des.c b/modules/algorithms/des.c
|
|
index 5810811..2ce51a8 100644
|
|
--- a/modules/algorithms/des.c
|
|
+++ b/modules/algorithms/des.c
|
|
@@ -35,9 +35,12 @@
|
|
|
|
/* #define NULL 0 */
|
|
|
|
-static void permute_ip(), permute_fp(), perminit_ip(), spinit(),
|
|
-perminit_fp();
|
|
-static word32 f();
|
|
+static void permute_ip(char *inblock, DES_KEY * key, char *outblock);
|
|
+static void permute_fp(char *inblock, DES_KEY * key, char *outblock);
|
|
+static void perminit_ip(DES_KEY * key);
|
|
+static void spinit(DES_KEY * key);
|
|
+static void perminit_fp(DES_KEY * key);
|
|
+static word32 f(DES_KEY * key, register word32 r, register char *subkey);
|
|
|
|
|
|
/* Tables defined in the Data Encryption Standard documents */
|
|
diff --git a/modules/algorithms/tripledes.c b/modules/algorithms/tripledes.c
|
|
index 7b3c324..8a8d8a7 100644
|
|
--- a/modules/algorithms/tripledes.c
|
|
+++ b/modules/algorithms/tripledes.c
|
|
@@ -36,8 +36,11 @@
|
|
|
|
/* #define NULL 0 */
|
|
|
|
-static void permute(), perminit(), spinit();
|
|
-static word32 f();
|
|
+static void permute(char *inblock, char perm[16][16][8], char *outblock);
|
|
+static void perminit(char perm[16][16][8], char p[64]);
|
|
+static void spinit(TRIPLEDES_KEY * key, int pos);
|
|
+static word32 f(TRIPLEDES_KEY * key, int pos, register word32 r,
|
|
+ register char *subkey);
|
|
|
|
|
|
/* Tables defined in the Data Encryption Standard documents */
|
|
@@ -199,8 +202,8 @@ static int _mcrypt_desinit(TRIPLEDES_KEY * key)
|
|
spinit(key, 0);
|
|
spinit(key, 1);
|
|
spinit(key, 2);
|
|
- perminit(&key->iperm, ip);
|
|
- perminit(&key->fperm, fp);
|
|
+ perminit(key->iperm, ip);
|
|
+ perminit(key->fperm, fp);
|
|
|
|
|
|
return 0;
|