mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-20 02:28:23 +00:00
Convert more unsigned char -> uint8_t.
llvm-svn: 183053
This commit is contained in:
parent
5f8ece3717
commit
3b08ea0a4f
@ -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<uint8_t> Data) {
|
||||
MD5_u32plus saved_lo;
|
||||
unsigned long used, free;
|
||||
|
@ -20,7 +20,7 @@ using namespace llvm;
|
||||
|
||||
namespace {
|
||||
/// \brief Tests an arbitrary set of bytes passed as \p Input.
|
||||
void TestMD5Sum(ArrayRef<unsigned char> Input, StringRef Final) {
|
||||
void TestMD5Sum(ArrayRef<uint8_t> Input, StringRef Final) {
|
||||
MD5 Hash;
|
||||
Hash.update(Input);
|
||||
MD5::MD5Result MD5Res;
|
||||
@ -31,20 +31,20 @@ void TestMD5Sum(ArrayRef<unsigned char> Input, StringRef Final) {
|
||||
}
|
||||
|
||||
TEST(MD5Test, MD5) {
|
||||
TestMD5Sum(ArrayRef<unsigned char>((const unsigned char *)"", (size_t) 0),
|
||||
TestMD5Sum(ArrayRef<uint8_t>((const uint8_t *)"", (size_t) 0),
|
||||
"d41d8cd98f00b204e9800998ecf8427e");
|
||||
TestMD5Sum(ArrayRef<unsigned char>((const unsigned char *)"a", (size_t) 1),
|
||||
TestMD5Sum(ArrayRef<uint8_t>((const uint8_t *)"a", (size_t) 1),
|
||||
"0cc175b9c0f1b6a831c399e269772661");
|
||||
TestMD5Sum(ArrayRef<unsigned char>(
|
||||
(const unsigned char *)"abcdefghijklmnopqrstuvwxyz",
|
||||
TestMD5Sum(ArrayRef<uint8_t>(
|
||||
(const uint8_t *)"abcdefghijklmnopqrstuvwxyz",
|
||||
(size_t) 26),
|
||||
"c3fcd3d76192e4007dfb496cca67e13b");
|
||||
TestMD5Sum(ArrayRef<unsigned char>((const unsigned char *)"\0", (size_t) 1),
|
||||
TestMD5Sum(ArrayRef<uint8_t>((const uint8_t *)"\0", (size_t) 1),
|
||||
"93b885adfe0da089cdf634904fd59f71");
|
||||
TestMD5Sum(ArrayRef<unsigned char>((const unsigned char *)"a\0", (size_t) 2),
|
||||
TestMD5Sum(ArrayRef<uint8_t>((const uint8_t *)"a\0", (size_t) 2),
|
||||
"4144e195f46de78a3623da7364d04f11");
|
||||
TestMD5Sum(ArrayRef<unsigned char>(
|
||||
(const unsigned char *)"abcdefghijklmnopqrstuvwxyz\0",
|
||||
TestMD5Sum(ArrayRef<uint8_t>(
|
||||
(const uint8_t *)"abcdefghijklmnopqrstuvwxyz\0",
|
||||
(size_t) 27),
|
||||
"81948d1f1554f58cd1a56ebb01f808cb");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user