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.

34 lines
719 B

  1. /*++
  2. // Copyright (c) 1997-2002 Microsoft Corporation, All Rights Reserved
  3. Module Name:
  4. CRC32.H
  5. Abstract:
  6. Standard CRC-32 implementation
  7. History:
  8. raymcc 07-Jul-97 Createada
  9. --*/
  10. #ifndef _CRC_H_
  11. #define _CRC_H_
  12. #define STARTING_CRC32_VALUE 0xFFFFFFFF
  13. DWORD UpdateCRC32(
  14. LPBYTE pSrc, // Points to buffer
  15. int nBytes, // Number of bytes to compute
  16. DWORD dwOldCrc // Must be STARTING_CRC_VALUE (0xFFFFFFFF)
  17. // if no previous CRC, otherwise this is the
  18. // CRC of the previous cycle.
  19. );
  20. #define FINALIZE_CRC32(x) (x=~x)
  21. #endif