2
* Data Encryption Standard
3
* D.P.Mitchell 83/06/08.
5
* block_cipher(key, block, decrypting)
7
* these routines use the non-standard 7 byte format
16
* destructively encrypt the buffer, which
17
* must be at least 8 characters long.
20
encrypt(void *key, void *vbuf, int n)
33
for(i = 0; i < n; i++){
34
block_cipher(ekey, buf, 0);
38
block_cipher(ekey, buf - 7 + r, 0);
43
* destructively decrypt the buffer, which
44
* must be at least 8 characters long.
47
decrypt(void *key, void *vbuf, int n)
62
block_cipher(ekey, buf - 7 + r, 1);
63
for(i = 0; i < n; i++){
65
block_cipher(ekey, buf, 1);