Team Fortress 2 Source Code as on 22/4/2020
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.

33 lines
820 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Generic MD5 hashing algo
  4. //
  5. //=============================================================================//
  6. #ifndef CHECKSUM_MD5_H
  7. #define CHECKSUM_MD5_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // 16 bytes == 128 bit digest
  12. #define MD5_DIGEST_LENGTH 16
  13. // MD5 Hash
  14. typedef struct
  15. {
  16. unsigned int buf[4];
  17. unsigned int bits[2];
  18. unsigned char in[64];
  19. } MD5Context_t;
  20. void MD5Init( MD5Context_t *context );
  21. void MD5Update( MD5Context_t *context, unsigned char const *buf, unsigned int len );
  22. void MD5Final( unsigned char digest[ MD5_DIGEST_LENGTH ], MD5Context_t *context );
  23. char *MD5_Print(unsigned char *digest, int hashlen );
  24. unsigned int MD5_PseudoRandom(unsigned int nSeed);
  25. #endif // CHECKSUM_MD5_H