md5.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program 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. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* MD5.H - header file for MD5C.C
  19. */
  20. /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
  21. rights reserved.
  22. License to copy and use this software is granted provided that it
  23. is identified as the "RSA Data Security, Inc. MD5 Message-Digest
  24. Algorithm" in all material mentioning or referencing this software
  25. or this function.
  26. License is also granted to make and use derivative works provided
  27. that such works are identified as "derived from the RSA Data
  28. Security, Inc. MD5 Message-Digest Algorithm" in all material
  29. mentioning or referencing the derived work.
  30. RSA Data Security, Inc. makes no representations concerning either
  31. the merchantability of this software or the suitability of this
  32. software for any particular purpose. It is provided "as is"
  33. without express or implied warranty of any kind.
  34. These notices must be retained in any copies of any part of this
  35. documentation and/or software.
  36. */
  37. #define MD 5
  38. #ifndef MD
  39. #define MD MD5
  40. #endif
  41. #define MD_CTX MD5_CTX
  42. #define MDInit MD5Init
  43. #define MDUpdate MD5Update
  44. #define MDFinal MD5Final
  45. /* MD5 context. */
  46. typedef struct {
  47. UINT4 state[4]; /* state (ABCD) */
  48. UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
  49. unsigned char buffer[64]; /* input buffer */
  50. } MD5_CTX;
  51. void MD5Init PROTO_LIST ((MD5_CTX *));
  52. void MD5Update PROTO_LIST
  53. ((MD5_CTX *, unsigned char *, unsigned int));
  54. void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));