md5_stream.h 375 B

12345678910111213141516171819
  1. #pragma once
  2. #include <util/stream/output.h>
  3. #include <library/cpp/digest/md5/md5.h>
  4. namespace NYql {
  5. class TMd5OutputStream : public IOutputStream {
  6. public:
  7. explicit TMd5OutputStream(IOutputStream& delegatee);
  8. TString Finalize();
  9. private:
  10. void DoWrite(const void* buf, size_t len) override;
  11. private:
  12. IOutputStream& Delegatee_;
  13. MD5 Accumulator_;
  14. };
  15. }