Leaked source code of windows server 2003
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.1 KiB

  1. /*++
  2. Copyright (c) 2001-2010 Microsoft Corporation
  3. Module Name:
  4. Md5.h
  5. Abstract:
  6. MD5 functions definitions.
  7. Author:
  8. [Ported by] Sanjay Kaniyar (sanjayka) 20-Oct-2001
  9. Revision History:
  10. **********************************************************************
  11. ** md5.h -- Header file for implementation of MD5 **
  12. ** RSA Data Security, Inc. MD5 Message Digest Algorithm **
  13. ** Created: 2/17/90 RLR **
  14. ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
  15. ** Revised (for MD5): RLR 4/27/91 **
  16. ** -- G modified to have y&~z instead of y&z **
  17. ** -- FF, GG, HH modified to add in last register done **
  18. ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
  19. ** -- distinct additive constant for each step **
  20. ** -- round 4 added, working mod 7 **
  21. **********************************************************************
  22. */
  23. /*
  24. **********************************************************************
  25. ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
  26. ** **
  27. ** License to copy and use this software is granted provided that **
  28. ** it is identified as the "RSA Data Security, Inc. MD5 Message **
  29. ** Digest Algorithm" in all material mentioning or referencing this **
  30. ** software or this function. **
  31. ** **
  32. ** License is also granted to make and use derivative works **
  33. ** provided that such works are identified as "derived from the RSA **
  34. ** Data Security, Inc. MD5 Message Digest Algorithm" in all **
  35. ** material mentioning or referencing the derived work. **
  36. ** **
  37. ** RSA Data Security, Inc. makes no representations concerning **
  38. ** either the merchantability of this software or the suitability **
  39. ** of this software for any particular purpose. It is provided "as **
  40. ** is" without express or implied warranty of any kind. **
  41. ** **
  42. ** These notices must be retained in any copies of any part of this **
  43. ** documentation and/or software. **
  44. **********************************************************************
  45. */
  46. #ifndef _MD5_H_
  47. #define _MD5_H_
  48. #define MD5_SCRATCH_LENGTH 4
  49. #define MD5_DATA_LENGTH 16
  50. //
  51. // Data structure for MD5 (Message Digest) computation.
  52. //
  53. // MD5_CONTEXT
  54. //
  55. typedef struct _MD5_CONTEXT {
  56. ULONG Scratch[MD5_SCRATCH_LENGTH];
  57. ULONG Data[MD5_DATA_LENGTH];
  58. } MD5_CONTEXT, *PMD5_CONTEXT;
  59. VOID
  60. MD5Init (
  61. PMD5_CONTEXT Md5Context,
  62. PULONG InitialRandomNumberList
  63. );
  64. ULONG
  65. ComputeMd5Transform (
  66. PMD5_CONTEXT Md5Context
  67. );
  68. #endif // _MD5_H_