diff --git a/missing/crypt.c b/missing/crypt.c index 97acbb9210..e2dda3ca08 100644 --- a/missing/crypt.c +++ b/missing/crypt.c @@ -108,16 +108,13 @@ static char sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93"; #define LARGEDATA #endif -int des_setkey(), des_cipher(); +void des_setkey(const char *key); +void des_cipher(const char *in, char *out, long salt, int num_iter); /* compile with "-DSTATIC=int" when profiling */ #ifndef STATIC #define STATIC static #endif -STATIC void init_des(), init_perm(), permute(); -#ifdef DEBUG -STATIC void prtab(); -#endif /* ==================================== */ @@ -303,11 +300,7 @@ typedef union { { C_block tblk; permute((cpp),&tblk,(p),4); LOAD ((d),(d0),(d1),tblk); } STATIC void -permute(cp, out, p, chars_in) - unsigned char *cp; - C_block *out; - register C_block *p; - int chars_in; +permute(unsigned char *cp, C_block *out, register C_block *p, int chars_in) { register DCL_BLOCK(D,D0,D1); register C_block *tp; @@ -323,6 +316,12 @@ permute(cp, out, p, chars_in) } #endif /* LARGEDATA */ +STATIC void init_des(void); +STATIC void init_perm(C_block perm[64/CHUNKBITS][1<= 0; i--) { k = cblock.b[i]; for (j = 7; j >= 0; j--) { @@ -969,15 +949,11 @@ encrypt(block, flag) k >>= 1; } } - return (0); } #ifdef DEBUG STATIC void -prtab(s, t, num_rows) - char *s; - unsigned char *t; - int num_rows; +prtab(const char *s, const unsigned char *t, int num_rows) { register int i, j;