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.

25 lines
888 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Engine crc routines
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CHECKSUM_H
  8. #define CHECKSUM_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "checksum_crc.h"
  13. #include "checksum_md5.h"
  14. #include "quakedef.h"
  15. bool CRC_File(CRC32_t *crcvalue, const char *pszFileName);
  16. byte COM_BlockSequenceCRCByte (byte *base, int length, int sequence);
  17. bool CRC_MapFile(CRC32_t *crcvalue, const char *pszFileName);
  18. bool MD5_MapFile(MD5Value_t *md5value, const char *pszFileName);
  19. bool MD5_Hash_File(unsigned char digest[16], const char *pszFileName, bool bSeed, unsigned int seed[4]);
  20. bool MD5_Hash_Buffer( unsigned char pDigest[16], const unsigned char *pBuffer, int nSize, bool bSeed = false, unsigned int seed[4] = NULL );
  21. #endif // CHECKSUM_H