btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / mail / des.h
blobe65744c4350a869d7d87d950b22c873cbbc5caaa
1 #ifndef ZOIDBERG_DES_H
2 #define ZOIDBERG_DES_H
3 /* DES - encryption algorithm, removed double and triple DES
4 **
5 ** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
6 */
8 /* des.h - adapted from d3des.h:
10 * Headers and defines for d3des.c
11 * Graven Imagery, 1992.
13 * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
14 * (GEnie : OUTER; CIS : [71755,204])
17 #define DES_ENCRYPT 0 /* MODE == encrypt */
18 #define DES_DECRYPT 1 /* MODE == decrypt */
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 extern void des_setkey(unsigned char *, short);
26 /* hexkey[8] MODE
27 * Sets the internal key register according to the hexadecimal
28 * key contained in the 8 bytes of hexkey, according to the DES,
29 * for encryption or decryption according to MODE.
32 extern void des_usekey(unsigned long *);
33 /* cookedkey[32]
34 * Loads the internal key register with the data in cookedkey.
37 extern void des_cpkey(unsigned long *);
38 /* cookedkey[32]
39 * Copies the contents of the internal key register into the storage
40 * located at &cookedkey[0].
43 extern void des_crypt(unsigned char *, unsigned char *);
44 /* from[8] to[8]
45 * Encrypts/Decrypts (according to the key currently loaded in the
46 * internal key register) one block of eight bytes at address 'from'
47 * into the block at address 'to'. They can be the same.
50 extern void des_encrypt(char *from,char *to);
51 extern void des_decrypt(char *from,int fromLength,char *to);
53 #ifdef __cplusplus
55 #endif
57 #endif /* ZOIDBERG_DES_H */