From 3b08ea0a4f95caafee6a827bac5cc48aacb9c74e Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 31 May 2013 22:34:52 +0000 Subject: [PATCH] Convert more unsigned char -> uint8_t. llvm-svn: 183053 --- lib/Support/MD5.cpp | 2 +- unittests/Support/MD5Test.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Support/MD5.cpp b/lib/Support/MD5.cpp index 4c72cef60b0..8f180684ff6 100644 --- a/lib/Support/MD5.cpp +++ b/lib/Support/MD5.cpp @@ -183,7 +183,7 @@ MD5::MD5() : a(0x67452301), b(0xefcdab89), c(0x98badcfe), d(0x10325476), hi(0), lo(0) { } -/// Incrementally add the bytes in Data to the hash. +/// Incrementally add the bytes in \p Data to the hash. void MD5::update(ArrayRef Data) { MD5_u32plus saved_lo; unsigned long used, free; diff --git a/unittests/Support/MD5Test.cpp b/unittests/Support/MD5Test.cpp index 6afaa15c27b..c5658ec4976 100644 --- a/unittests/Support/MD5Test.cpp +++ b/unittests/Support/MD5Test.cpp @@ -20,7 +20,7 @@ using namespace llvm; namespace { /// \brief Tests an arbitrary set of bytes passed as \p Input. -void TestMD5Sum(ArrayRef Input, StringRef Final) { +void TestMD5Sum(ArrayRef Input, StringRef Final) { MD5 Hash; Hash.update(Input); MD5::MD5Result MD5Res; @@ -31,20 +31,20 @@ void TestMD5Sum(ArrayRef Input, StringRef Final) { } TEST(MD5Test, MD5) { - TestMD5Sum(ArrayRef((const unsigned char *)"", (size_t) 0), + TestMD5Sum(ArrayRef((const uint8_t *)"", (size_t) 0), "d41d8cd98f00b204e9800998ecf8427e"); - TestMD5Sum(ArrayRef((const unsigned char *)"a", (size_t) 1), + TestMD5Sum(ArrayRef((const uint8_t *)"a", (size_t) 1), "0cc175b9c0f1b6a831c399e269772661"); - TestMD5Sum(ArrayRef( - (const unsigned char *)"abcdefghijklmnopqrstuvwxyz", + TestMD5Sum(ArrayRef( + (const uint8_t *)"abcdefghijklmnopqrstuvwxyz", (size_t) 26), "c3fcd3d76192e4007dfb496cca67e13b"); - TestMD5Sum(ArrayRef((const unsigned char *)"\0", (size_t) 1), + TestMD5Sum(ArrayRef((const uint8_t *)"\0", (size_t) 1), "93b885adfe0da089cdf634904fd59f71"); - TestMD5Sum(ArrayRef((const unsigned char *)"a\0", (size_t) 2), + TestMD5Sum(ArrayRef((const uint8_t *)"a\0", (size_t) 2), "4144e195f46de78a3623da7364d04f11"); - TestMD5Sum(ArrayRef( - (const unsigned char *)"abcdefghijklmnopqrstuvwxyz\0", + TestMD5Sum(ArrayRef( + (const uint8_t *)"abcdefghijklmnopqrstuvwxyz\0", (size_t) 27), "81948d1f1554f58cd1a56ebb01f808cb"); }