LLVM: include/llvm/Support/raw_sha1_ostream.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_SUPPORT_RAW_SHA1_OSTREAM_H
14#define LLVM_SUPPORT_RAW_SHA1_OSTREAM_H
15
19
20namespace llvm {
21
22
25
26
27 void write_impl(const char *Ptr, size_t Size) override {
29 }
30
31public:
32
33 std::array<uint8_t, 20> sha1() {
35 return State.result();
36 }
37
38
40
42};
43
44}
45
46#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A class that wrap the SHA1 algorithm.
LLVM_ABI void update(ArrayRef< uint8_t > Data)
Digest more data.
raw_ostream(bool unbuffered=false, OStreamKind K=OStreamKind::OK_OStream)
A raw_ostream that hash the content using the sha1 algorithm.
Definition raw_sha1_ostream.h:23
void resetHash()
Reset the internal state to start over from scratch.
Definition raw_sha1_ostream.h:39
uint64_t current_pos() const override
Return the current position within the stream, not counting the bytes currently in the buffer.
Definition raw_sha1_ostream.h:41
std::array< uint8_t, 20 > sha1()
Return the current SHA1 hash for the content of the stream.
Definition raw_sha1_ostream.h:33
This is an optimization pass for GlobalISel generic memory operations.