28 #ifndef LLVM_SUPPORT_MD5_H 29 #define LLVM_SUPPORT_MD5_H 39 template <
typename T>
class ArrayRef;
45 MD5_u32plus a = 0x67452301;
46 MD5_u32plus b = 0xefcdab89;
47 MD5_u32plus c = 0x98badcfe;
48 MD5_u32plus d = 0x10325476;
52 MD5_u32plus block[16];
58 operator std::array<uint8_t, 16>()
const {
return Bytes; }
65 uint64_t
low()
const {
68 using namespace support;
69 return endian::read<uint64_t, little, unaligned>(Bytes.data());
73 using namespace support;
74 return endian::read<uint64_t, little, unaligned>(Bytes.data() + 8);
76 std::pair<uint64_t, uint64_t>
words()
const {
77 using namespace support;
78 return std::make_pair(
high(),
low());
110 using namespace support;
122 #endif // LLVM_SUPPORT_MD5_H This class represents lattice values for constants.
static void stringifyResult(MD5Result &Result, SmallString< 32 > &Str)
Translates the bytes in Res to a hex string that is deposited into Str.
SmallString< 32 > digest() const
uint64_t MD5Hash(StringRef Str)
Helper to compute and return lower 64 bits of the given string's MD5 hash.
void update(ArrayRef< uint8_t > Data)
Updates the hash for the byte stream provided.
std::pair< uint64_t, uint64_t > words() const
const uint8_t & operator[](size_t I) const
uint8_t & operator[](size_t I)
static std::array< uint8_t, 16 > hash(ArrayRef< uint8_t > Data)
Computes the hash for a given bytes.
std::array< uint8_t, 16 > Bytes
void final(MD5Result &Result)
Finishes off the hash and puts the result in result.
StringRef - Represent a constant reference to a string, i.e.
bool operator==(uint64_t V1, const APInt &V2)