diff options
Diffstat (limited to 'llvm/lib/Support/MD5.cpp')
-rw-r--r-- | llvm/lib/Support/MD5.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Support/MD5.cpp b/llvm/lib/Support/MD5.cpp index 942571eab0f..809dbbce708 100644 --- a/llvm/lib/Support/MD5.cpp +++ b/llvm/lib/Support/MD5.cpp @@ -38,9 +38,13 @@ */ #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Endian.h" #include "llvm/Support/Format.h" #include "llvm/Support/MD5.h" #include "llvm/Support/raw_ostream.h" +#include <array> +#include <cstdint> #include <cstring> // The basic MD5 functions. @@ -68,7 +72,7 @@ ((MD5_u32plus) ptr[(n) * 4 + 3] << 24)) #define GET(n) (block[(n)]) -namespace llvm { +using namespace llvm; /// \brief This processes one or more 64-byte data blocks, but does NOT update ///the bit counters. There are no alignment requirements. @@ -179,9 +183,7 @@ const uint8_t *MD5::body(ArrayRef<uint8_t> Data) { return ptr; } -MD5::MD5() - : a(0x67452301), b(0xefcdab89), c(0x98badcfe), d(0x10325476), hi(0), lo(0) { -} +MD5::MD5() = default; /// Incrementally add the bytes in \p Data to the hash. void MD5::update(ArrayRef<uint8_t> Data) { @@ -275,4 +277,3 @@ std::array<uint8_t, 16> MD5::hash(ArrayRef<uint8_t> Data) { memcpy(Arr.data(), Res, sizeof(Res)); return Arr; } -} |