View | Details | Raw Unified | Return to bug 211626 | Differences between
and this patch

Collapse All | Expand All

(-)xisp-2.7p4-patched/pcode.c (-10 lines)
Lines 68-82 Link Here
68
void pencode(unsigned char *ep, unsigned char *pp)
68
void pencode(unsigned char *ep, unsigned char *pp)
69
{
69
{
70
	int i;
70
	int i;
71
#if !(defined(BSD) && BSD >= 199306)
72
 	void setkey(), encrypt();
73
#endif
74
71
75
	cupack(ukey, pkey);				/* unpack the key */
72
	cupack(ukey, pkey);				/* unpack the key */
76
	setkey(ukey);					/* insert it in crypt's machine */
77
	for (i=0; i<8; i++) {			/* do all 64 bytes */
73
	for (i=0; i<8; i++) {			/* do all 64 bytes */
78
		cupack(upwd, pp);			/* unpack the plain-text password */
74
		cupack(upwd, pp);			/* unpack the plain-text password */
79
		encrypt(upwd, 0);			/* encrypt it in place */
80
		cpack(ep, upwd);			/* copy it out into the result */
75
		cpack(ep, upwd);			/* copy it out into the result */
81
		ep += 8; pp += 8;			/* get next 8 bytes */
76
		ep += 8; pp += 8;			/* get next 8 bytes */
82
	}
77
	}
Lines 86-100 Link Here
86
void pdecode(unsigned char *pp, unsigned char *ep)
81
void pdecode(unsigned char *pp, unsigned char *ep)
87
{
82
{
88
	int i;
83
	int i;
89
#if !(defined(BSD) && BSD >= 199306)
90
	void setkey(), encrypt();
91
#endif
92
84
93
	cupack(ukey, pkey);				/* unpack the key */
85
	cupack(ukey, pkey);				/* unpack the key */
94
	setkey(ukey);					/* insert it in crypt's machine */
95
	for (i=0; i<8; i++) {			/* do all 64 bytes */
86
	for (i=0; i<8; i++) {			/* do all 64 bytes */
96
		cupack(upwd, ep);			/* unpack the encrypted password */
87
		cupack(upwd, ep);			/* unpack the encrypted password */
97
		encrypt(upwd, 1);			/* decrypt it in place */
98
		cpack(pp, upwd);			/* copy it out into the result */
88
		cpack(pp, upwd);			/* copy it out into the result */
99
		ep += 8; pp += 8;			/* get next 8 bytes */
89
		ep += 8; pp += 8;			/* get next 8 bytes */
100
	}
90
	}

Return to bug 211626