|
|
1.1 root 1: /* @(#)crypt.c 4.1 (Berkeley) 12/21/80 */
2: /*
3: * This program implements a compatable interface for the
4: * Proposed Federal Information Processing
5: * Data Encryption Standard.
6: * See Federal Register, March 17, 1975 (40FR12134)
7: */
8:
9: /*
10: * Set up the key schedule from the key.
11: */
12: static char save_key[60];
13: setkey(key)
14: char *key;
15: {
16: strncpy(save_key,key,60);
17: }
18:
19: /*
20: * The payoff: encrypt a block.
21: */
22:
23: encrypt(block, edflag)
24: char *block;
25: {
26: }
27:
28: char *
29: crypt(pw,salt)
30: char *pw;
31: char *salt;
32: {
33: static char iobuf[16];
34:
35: strncpy(iobuf,salt,2);
36: strncpy(iobuf+2,pw,10);
37: if(iobuf[1]==0)
38: iobuf[1] = iobuf[0];
39: return(iobuf);
40: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.