Imported MDR. Some code still not entirely functional -- I haven't been able to figure out how to detect SSL, so IMAP and POP have it turned off. PPP auto-detect is also not functional at the moment. Other than that, it seems to work beautifully. Packaging will come later.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9016 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Nathan Whitehorn
2004-09-20 22:31:50 +00:00
parent 48061f2026
commit f7215ac853
154 changed files with 75670 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
#ifndef ZOIDBERG_DES_H
#define ZOIDBERG_DES_H
/* DES - encryption algorithm, removed double and triple DES
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
/* des.h - adapted from d3des.h:
*
* Headers and defines for d3des.c
* Graven Imagery, 1992.
*
* Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
* (GEnie : OUTER; CIS : [71755,204])
*/
#define DES_ENCRYPT 0 /* MODE == encrypt */
#define DES_DECRYPT 1 /* MODE == decrypt */
#ifdef __cplusplus
extern "C" {
#endif
extern void des_setkey(unsigned char *, short);
/* hexkey[8] MODE
* Sets the internal key register according to the hexadecimal
* key contained in the 8 bytes of hexkey, according to the DES,
* for encryption or decryption according to MODE.
*/
extern void des_usekey(unsigned long *);
/* cookedkey[32]
* Loads the internal key register with the data in cookedkey.
*/
extern void des_cpkey(unsigned long *);
/* cookedkey[32]
* Copies the contents of the internal key register into the storage
* located at &cookedkey[0].
*/
extern void des_crypt(unsigned char *, unsigned char *);
/* from[8] to[8]
* Encrypts/Decrypts (according to the key currently loaded in the
* internal key register) one block of eight bytes at address 'from'
* into the block at address 'to'. They can be the same.
*/
extern void des_encrypt(char *from,char *to);
extern void des_decrypt(char *from,int fromLength,char *to);
#ifdef __cplusplus
}
#endif
#endif /* ZOIDBERG_DES_H */