d3des.h
Upload User: sbftbdw
Upload Date: 2007-01-03
Package Size: 379k
Code Size: 2k
Category:

Remote Control

Development Platform:

Visual C++

  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. /* d3des.h -
  12.  *
  13.  *      Headers and defines for d3des.c
  14.  *      Graven Imagery, 1992.
  15.  *
  16.  * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
  17.  *      (GEnie : OUTER; CIS : [71755,204])
  18.  */
  19. #define EN0     0       /* MODE == encrypt */
  20. #define DE1     1       /* MODE == decrypt */
  21. extern void deskey(unsigned char *, int);
  22. /*                    hexkey[8]     MODE
  23.  * Sets the internal key register according to the hexadecimal
  24.  * key contained in the 8 bytes of hexkey, according to the DES,
  25.  * for encryption or decryption according to MODE.
  26.  */
  27. extern void usekey(unsigned long *);
  28. /*                  cookedkey[32]
  29.  * Loads the internal key register with the data in cookedkey.
  30.  */
  31. extern void cpkey(unsigned long *);
  32. /*                 cookedkey[32]
  33.  * Copies the contents of the internal key register into the storage
  34.  * located at &cookedkey[0].
  35.  */
  36. extern void des(unsigned char *, unsigned char *);
  37. /*                  from[8]           to[8]
  38.  * Encrypts/Decrypts (according to the key currently loaded in the
  39.  * internal key register) one block of eight bytes at address 'from'
  40.  * into the block at address 'to'.  They can be the same.
  41.  */
  42. /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
  43.  ********************************************************************/