summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/win32/des_fcrypt.patch
blob: 7088e94a7ea33394e48b9bb00b50aa923cd5201c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
You need the GNU `patch' utility to apply this patch.  Get:

    ftp://fractal.mta.ca/pub/crypto/SSLeay/DES/libdes-3.06.tar.gz

Uncompress it somewhere, and use the command line:

    patch -p1 -N < this_file

to apply the patch.  Move the fcrypt.c file to the win32 subdirectory
of the Perl source distribution.

--- libdes-3.06/fcrypt.c.dist	Tue Aug  4 18:41:49 1998
+++ libdes-3.06/fcrypt.c	Tue Aug  4 18:42:03 1998
@@ -325,12 +325,15 @@
 
 static char shifts2[16]={0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0};
 
-static int body();
-static int des_set_key();
+static int body(
+	unsigned long *out0,
+	unsigned long *out1,
+	des_key_schedule ks,
+	unsigned long Eswap0,
+	unsigned long Eswap1);
 
-static int des_set_key(key,schedule)
-des_cblock *key;
-des_key_schedule schedule;
+static int
+des_set_key(des_cblock *key, des_key_schedule schedule)
 	{
 	register unsigned long c,d,t,s;
 	register unsigned char *in;
@@ -460,16 +463,14 @@
 0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A
 };
 
-char *crypt(buf,salt)
-char *buf;
-char *salt;
+char *
+des_fcrypt(const char *buf, const char *salt, char *buff)
 	{
 	unsigned int i,j,x,y;
 	unsigned long Eswap0=0,Eswap1=0;
 	unsigned long out[2],ll;
 	des_cblock key;
 	des_key_schedule ks;
-	static unsigned char buff[20];
 	unsigned char bb[9];
 	unsigned char *b=bb;
 	unsigned char c,u;
@@ -521,13 +522,15 @@
 		buff[i]=cov_2char[c];
 		}
 	buff[13]='\0';
-	return((char *)buff);
+	return buff;
 	}
 
-static int body(out0,out1,ks,Eswap0,Eswap1)
-unsigned long *out0,*out1;
-des_key_schedule *ks;
-unsigned long Eswap0,Eswap1;
+static int 
+body(	unsigned long *out0,
+	unsigned long *out1,
+	des_key_schedule ks,
+	unsigned long Eswap0,
+	unsigned long Eswap1)
 	{
 	register unsigned long l,r,t,u,v;
 #ifdef ALT_ECB
End of Patch.