28 #ifndef LLVM_SUPPORT_MD5_H
29 #define LLVM_SUPPORT_MD5_H
39 template <
typename T>
class ArrayRef;
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());
91 void final(MD5Result &Result);
110 using namespace support;
122 #endif // LLVM_SUPPORT_MD5_H
std::pair< uint64_t, uint64_t > words() const
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.
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
const uint8_t & operator[](size_t I) const
std::string Hash(const Unit &U)
StringRef - Represent a constant reference to a string, i.e.
bool operator==(uint64_t V1, const APInt &V2)