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.

87 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 2000 Intel Corporation
  3. Module Name:
  4. md5.h
  5. Abstract:
  6. Add support for IEEE Node address generation when there is
  7. not a SNP-compliant NIC attached.
  8. Revision History
  9. */
  10. /*
  11. **********************************************************************
  12. ** md5.h -- Header file for implementation of MD5 **
  13. ** RSA Data Security, Inc. MD5 Message Digest Algorithm **
  14. ** Created: 2/17/90 RLR **
  15. ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
  16. ** Revised (for MD5): RLR 4/27/91 **
  17. ** -- G modified to have y&~z instead of y&z **
  18. ** -- FF, GG, HH modified to add in last register done **
  19. ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
  20. ** -- distinct additive constant for each step **
  21. ** -- round 4 added, working mod 7 **
  22. **********************************************************************
  23. */
  24. /*
  25. **********************************************************************
  26. ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
  27. ** **
  28. ** License to copy and use this software is granted provided that **
  29. ** it is identified as the "RSA Data Security, Inc. MD5 Message **
  30. ** Digest Algorithm" in all material mentioning or referencing this **
  31. ** software or this function. **
  32. ** **
  33. ** License is also granted to make and use derivative works **
  34. ** provided that such works are identified as "derived from the RSA **
  35. ** Data Security, Inc. MD5 Message Digest Algorithm" in all **
  36. ** material mentioning or referencing the derived work. **
  37. ** **
  38. ** RSA Data Security, Inc. makes no representations concerning **
  39. ** either the merchantability of this software or the suitability **
  40. ** of this software for any particular purpose. It is provided "as **
  41. ** is" without express or implied warranty of any kind. **
  42. ** **
  43. ** These notices must be retained in any copies of any part of this **
  44. ** documentation and/or software. **
  45. **********************************************************************
  46. */
  47. #ifndef _MD5_H_
  48. #define _MD5_H_
  49. /* Data structure for MD5 (Message Digest) computation */
  50. typedef struct {
  51. UINT32 i[2]; /* number of _bits_ handled mod 2^64 */
  52. UINT32 buf[4]; /* scratch buffer */
  53. unsigned char in[64]; /* input buffer */
  54. unsigned char digest[16]; /* actual digest after MD5Final call */
  55. } MD5_CTX;
  56. void MD5Init (
  57. MD5_CTX *mdContext
  58. );
  59. void MD5Update (
  60. MD5_CTX *mdContext,
  61. unsigned char *inBuf,
  62. unsigned int inLen
  63. );
  64. void MD5Final (
  65. MD5_CTX *mdContext
  66. );
  67. void GenNodeID(
  68. unsigned char *pDataBuf,
  69. long cData,
  70. UINT8 NodeID[]
  71. );
  72. #endif