aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/md5_stream.h
blob: ca8b1c4bb94ee78ab9fd8d85f4a62976b2eb0a5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <util/stream/output.h>
#include <library/cpp/digest/md5/md5.h>

namespace NYql {
class TMd5OutputStream : public IOutputStream {
public:
    explicit TMd5OutputStream(IOutputStream& delegatee);
    TString Finalize();

private:
    void DoWrite(const void* buf, size_t len) override;

private:
    IOutputStream& Delegatee_;
    MD5 Accumulator_;
};
}