Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
906 B

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: des.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. typedef struct _destable {
  14. unsigned long keytab[16][2];
  15. } DESTable;
  16. #define DES_TABLESIZE sizeof(DESTable)
  17. #define DES_BLOCKLEN 8
  18. #define DES_KEYSIZE 8
  19. /* In deskey.c:
  20. Fill in the DESTable struct with the decrypt and encrypt
  21. key expansions.
  22. Assumes that the second parameter points to DES_BLOCKLEN
  23. bytes of key.
  24. */
  25. void deskey(DESTable *,unsigned char *);
  26. /* In desport.c:
  27. Encrypt or decrypt with the key in DESTable
  28. */
  29. void des(BYTE *pbIn, BYTE *pbOut, void *key, int op);
  30. extern int Asmversion; /* 1 if we're linked with an asm version, 0 if C */
  31. #ifdef __cplusplus
  32. }
  33. #endif