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.

35 lines
653 B

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