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.

60 lines
1.0 KiB

  1. #pragma once
  2. typedef DWORD SHA_WORD;
  3. #define SHA1_MESSAGE_BYTE_LENGTH ( 512/8 )
  4. typedef struct _tagFASTSHA1_STATE
  5. {
  6. DWORD cbStruct;
  7. BOOL bIsSha1Locked;
  8. SHA_WORD dwHValues[5];
  9. BYTE bLatestMessage[SHA1_MESSAGE_BYTE_LENGTH];
  10. DWORD bLatestMessageSize;
  11. LARGE_INTEGER cbTotalMessageSizeInBytes;
  12. }
  13. FASTSHA1_STATE, *PFASTSHA1_STATE;
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. BOOL
  18. InitializeFastSHA1State(
  19. DWORD dwFlags,
  20. PFASTSHA1_STATE pState
  21. );
  22. BOOL
  23. FinalizeFastSHA1State(
  24. DWORD dwFlags,
  25. PFASTSHA1_STATE pState
  26. );
  27. BOOL
  28. GetFastSHA1Result(
  29. PFASTSHA1_STATE pState,
  30. PBYTE pdwDestination,
  31. PSIZE_T cbDestination
  32. );
  33. BOOL
  34. HashMoreFastSHA1Data(
  35. PFASTSHA1_STATE pState,
  36. PBYTE pbData,
  37. SIZE_T cbData
  38. );
  39. BOOL
  40. CompareFashSHA1Hashes(
  41. PFASTSHA1_STATE pStateLeft,
  42. PFASTSHA1_STATE pStateRight,
  43. BOOL *pbComparesEqual
  44. );
  45. #ifdef __cplusplus
  46. };
  47. #endif