| Index: crypto/hmac_unittest.cc
|
| ===================================================================
|
| --- crypto/hmac_unittest.cc (revision 79901)
|
| +++ crypto/hmac_unittest.cc (working copy)
|
| @@ -4,7 +4,7 @@
|
|
|
| #include <string>
|
|
|
| -#include "base/hmac.h"
|
| +#include "crypto/hmac.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| static const int kSHA1DigestSize = 20;
|
| @@ -52,7 +52,7 @@
|
|
|
| std::string message_data(kMessage);
|
|
|
| - base::HMAC hmac(base::HMAC::SHA1);
|
| + crypto::HMAC hmac(crypto::HMAC::SHA1);
|
| ASSERT_TRUE(hmac.Init(kClientKey, kKeySize));
|
| unsigned char calculated_hmac[kSHA1DigestSize];
|
|
|
| @@ -121,7 +121,7 @@
|
| };
|
|
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
|
| - base::HMAC hmac(base::HMAC::SHA1);
|
| + crypto::HMAC hmac(crypto::HMAC::SHA1);
|
| ASSERT_TRUE(hmac.Init(reinterpret_cast<const unsigned char*>(cases[i].key),
|
| cases[i].key_len));
|
| std::string data_string(cases[i].data, cases[i].data_len);
|
| @@ -147,7 +147,7 @@
|
| 0x05, 0x46, 0x04, 0x0f, 0x0e, 0xe3, 0x7f, 0x54
|
| };
|
|
|
| - base::HMAC hmac(base::HMAC::SHA256);
|
| + crypto::HMAC hmac(crypto::HMAC::SHA256);
|
| ASSERT_TRUE(hmac.Init(key, sizeof(key)));
|
| unsigned char calculated_hmac[kSHA256DigestSize];
|
|
|
| @@ -187,14 +187,14 @@
|
|
|
| std::string message_data(kKnownMessage);
|
|
|
| - base::HMAC hmac(base::HMAC::SHA1);
|
| + crypto::HMAC hmac(crypto::HMAC::SHA1);
|
| ASSERT_TRUE(hmac.Init(kKnownSecretKey, kKnownSecretKeySize));
|
| unsigned char calculated_hmac[kSHA1DigestSize];
|
|
|
| EXPECT_TRUE(hmac.Sign(message_data, calculated_hmac, kSHA1DigestSize));
|
| EXPECT_EQ(0, memcmp(kKnownHMACSHA1, calculated_hmac, kSHA1DigestSize));
|
|
|
| - base::HMAC hmac2(base::HMAC::SHA256);
|
| + crypto::HMAC hmac2(crypto::HMAC::SHA256);
|
| ASSERT_TRUE(hmac2.Init(kKnownSecretKey, kKnownSecretKeySize));
|
| unsigned char calculated_hmac2[kSHA256DigestSize];
|
|
|
| @@ -225,7 +225,7 @@
|
| "\xBB\xFF\x1A\x91" }
|
| };
|
|
|
| - base::HMAC hmac(base::HMAC::SHA1);
|
| + crypto::HMAC hmac(crypto::HMAC::SHA1);
|
| ASSERT_TRUE(hmac.Init(reinterpret_cast<const unsigned char*>(key), key_len));
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
|
| std::string data_string(cases[i].data, cases[i].data_len);
|
|
|