Mercurial > ecos
comparison packages/services/gfx/mw/current/src/demos/vnc/libvncauth/d3des.h @ 208:e0c0827131d1 ecos
Merge from eCos master repository on 2002-05-20-20:11:54-BST
| author | jlarmour |
|---|---|
| date | Mon, 20 May 2002 22:19:26 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 207:74c807ddde34 | 208:e0c0827131d1 |
|---|---|
| 1 /* | |
| 2 * This is D3DES (V5.09) by Richard Outerbridge with the double and | |
| 3 * triple-length support removed for use in VNC. | |
| 4 * | |
| 5 * These changes are Copyright (C) 1998 Olivetti & Oracle Research Laboratory | |
| 6 * | |
| 7 * This software is distributed in the hope that it will be useful, | |
| 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 10 */ | |
| 11 | |
| 12 /* d3des.h - | |
| 13 * | |
| 14 * Headers and defines for d3des.c | |
| 15 * Graven Imagery, 1992. | |
| 16 * | |
| 17 * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge | |
| 18 * (GEnie : OUTER; CIS : [71755,204]) | |
| 19 */ | |
| 20 | |
| 21 #define EN0 0 /* MODE == encrypt */ | |
| 22 #define DE1 1 /* MODE == decrypt */ | |
| 23 | |
| 24 extern void deskey(unsigned char *, short); | |
| 25 /* hexkey[8] MODE | |
| 26 * Sets the internal key register according to the hexadecimal | |
| 27 * key contained in the 8 bytes of hexkey, according to the DES, | |
| 28 * for encryption or decryption according to MODE. | |
| 29 */ | |
| 30 | |
| 31 extern void usekey(unsigned long *); | |
| 32 /* cookedkey[32] | |
| 33 * Loads the internal key register with the data in cookedkey. | |
| 34 */ | |
| 35 | |
| 36 extern void cpkey(unsigned long *); | |
| 37 /* cookedkey[32] | |
| 38 * Copies the contents of the internal key register into the storage | |
| 39 * located at &cookedkey[0]. | |
| 40 */ | |
| 41 | |
| 42 extern void des(unsigned char *, unsigned char *); | |
| 43 /* from[8] to[8] | |
| 44 * Encrypts/Decrypts (according to the key currently loaded in the | |
| 45 * internal key register) one block of eight bytes at address 'from' | |
| 46 * into the block at address 'to'. They can be the same. | |
| 47 */ | |
| 48 | |
| 49 /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery | |
| 50 ********************************************************************/ |
