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.

46 lines
1.2 KiB

  1. /* hash.h */
  2. /*********************************/
  3. /* Function Definitions */
  4. /*********************************/
  5. #ifdef CSP_USE_MD5
  6. //
  7. // Function : TestMD5
  8. //
  9. // Description : This function hashes the passed in message with the MD5 hash
  10. // algorithm and returns the resulting hash value.
  11. //
  12. BOOL TestMD5(
  13. BYTE *pbMsg,
  14. DWORD cbMsg,
  15. BYTE *pbHash
  16. );
  17. #endif // CSP_USE_MD5
  18. #ifdef CSP_USE_SHA1
  19. //
  20. // Function : TestSHA1
  21. //
  22. // Description : This function hashes the passed in message with the SHA1 hash
  23. // algorithm and returns the resulting hash value.
  24. //
  25. BOOL TestSHA1(
  26. BYTE *pbMsg,
  27. DWORD cbMsg,
  28. BYTE *pbHash
  29. );
  30. #endif // CSP_USE_SHA1
  31. Hash_t *allocHash ();
  32. void freeHash (Hash_t *hash);
  33. DWORD feedHashData (Hash_t *hash, BYTE *data, DWORD len);
  34. DWORD finishHash (Hash_t *hash, BYTE *pbData, DWORD *len);
  35. DWORD getHashParams (Hash_t *hash, DWORD param, BYTE *pbData, DWORD *len);
  36. DWORD setHashParams (Hash_t *hash, DWORD param, CONST BYTE *pbData);
  37. DWORD DuplicateHash(
  38. Hash_t *pHash,
  39. Hash_t *pNewHash
  40. );