/apps/desktop/libvncserver/d3des.h

http://ftk.googlecode.com/ · C++ Header · 56 lines · 9 code · 9 blank · 38 comment · 0 complexity · e0910b05ebee2e37c41647ae9ac57870 MD5 · raw file

  1. #ifndef D3DES_H
  2. #define D3DES_H
  3. /*
  4. * This is D3DES (V5.09) by Richard Outerbridge with the double and
  5. * triple-length support removed for use in VNC.
  6. *
  7. * These changes are:
  8. * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
  9. *
  10. * This software is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14. /* d3des.h -
  15. *
  16. * Headers and defines for d3des.c
  17. * Graven Imagery, 1992.
  18. *
  19. * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge
  20. * (GEnie : OUTER; CIS : [71755,204])
  21. */
  22. #define EN0 0 /* MODE == encrypt */
  23. #define DE1 1 /* MODE == decrypt */
  24. extern void rfbDesKey(unsigned char *, int);
  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. extern void rfbUseKey(unsigned long *);
  31. /* cookedkey[32]
  32. * Loads the internal key register with the data in cookedkey.
  33. */
  34. extern void rfbCPKey(unsigned long *);
  35. /* cookedkey[32]
  36. * Copies the contents of the internal key register into the storage
  37. * located at &cookedkey[0].
  38. */
  39. extern void rfbDes(unsigned char *, unsigned char *);
  40. /* from[8] to[8]
  41. * Encrypts/Decrypts (according to the key currently loaded in the
  42. * internal key register) one block of eight bytes at address 'from'
  43. * into the block at address 'to'. They can be the same.
  44. */
  45. /* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery
  46. ********************************************************************/
  47. #endif