Source code of Windows XP (NT5)
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.

32 lines
579 B

  1. #include "stdinc.h"
  2. #include "cstreamtap.h"
  3. STDMETHODIMP
  4. CTeeStreamWithHash::Read(
  5. void* pv,
  6. ULONG cb,
  7. ULONG *pcbRead
  8. )
  9. {
  10. HRESULT hr = E_FAIL;
  11. FN_TRACE_HR(hr);
  12. IFCOMFAILED_EXIT( CTeeStream::Read( pv, cb, pcbRead ) );
  13. IFW32FALSE_EXIT(this->m_hCryptHash.Win32HashData((PBYTE)pv, *pcbRead));
  14. hr = S_OK;
  15. Exit:
  16. return hr;
  17. }
  18. STDMETHODIMP
  19. CTeeStreamWithHash::Seek(
  20. LARGE_INTEGER,
  21. DWORD,
  22. ULARGE_INTEGER*
  23. )
  24. {
  25. FN_PROLOG_WIN32
  26. INTERNAL_ERROR_CHECK2(FALSE, "Don't call Seek on a crypto hash input stream");
  27. FN_EPILOG
  28. }