LLVM: include/llvm/Support/MD5.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28#ifndef LLVM_SUPPORT_MD5_H
29#define LLVM_SUPPORT_MD5_H
30
34#include
35#include
36
37namespace llvm {
38
40template class ArrayRef;
41
43public:
44 struct MD5Result : std::array<uint8_t, 16> {
46
53
58 std::pair<uint64_t, uint64_t> words() const {
61 }
62 };
63
65
66
68
69
71
72
74
75
77
78
79
80
82
83
84
87
88
90
91private:
92
94
95
96 struct {
97 MD5_u32plus a = 0x67452301;
98 MD5_u32plus b = 0xefcdab89;
99 MD5_u32plus c = 0x98badcfe;
100 MD5_u32plus d = 0x10325476;
105 } InternalState;
106
108};
109
110
113
114 MD5 Hash;
117 Hash.final(Result);
118
119 return Result.low();
120}
121
122}
123
124#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
MD5_u32plus block[16]
Definition MD5.h:104
MD5_u32plus a
Definition MD5.h:97
LLVM_ABI void update(ArrayRef< uint8_t > Data)
Updates the hash for the byte stream provided.
static LLVM_ABI void stringifyResult(MD5Result &Result, SmallVectorImpl< char > &Str)
Translates the bytes in Res to a hex string that is deposited into Str.
LLVM_ABI void final(MD5Result &Result)
Finishes off the hash and puts the result in result.
MD5_u32plus hi
Definition MD5.h:101
LLVM_ABI MD5Result result()
Finishes off the hash, and returns the 16-byte hash data.
static LLVM_ABI MD5Result hash(ArrayRef< uint8_t > Data)
Computes the hash for a given bytes.
uint8_t buffer[64]
Definition MD5.h:103
MD5_u32plus lo
Definition MD5.h:102
MD5_u32plus b
Definition MD5.h:98
MD5_u32plus d
Definition MD5.h:100
MD5_u32plus c
Definition MD5.h:99
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
uint64_t MD5Hash(const FunctionId &Obj)
value_type read(const void *memory, endianness endian)
Read a value of a particular endianness from memory.
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
LLVM_ABI SmallString< 32 > digest() const
uint64_t low() const
Definition MD5.h:47
uint64_t high() const
Definition MD5.h:54
std::pair< uint64_t, uint64_t > words() const
Definition MD5.h:58