chromium/crypto/hmac_unittest.cc

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "crypto/hmac.h"

#include <stddef.h>
#include <string.h>

#include <string>
#include <string_view>

#include "testing/gtest/include/gtest/gtest.h"

static const size_t kSHA1DigestSize =;
static const size_t kSHA256DigestSize =;

static const char* kSimpleKey =;
static const size_t kSimpleKeyLength =;

static const struct {} kSimpleHmacCases[] =;

TEST(HMACTest, HmacSafeBrowsingResponseTest) {}

// Test cases from RFC 2202 section 3
TEST(HMACTest, RFC2202TestCases) {}

// TODO(wtc): add other test vectors from RFC 4231.
TEST(HMACTest, RFC4231TestCase6) {}

// Based on NSS's FIPS HMAC power-up self-test.
TEST(HMACTest, NSSFIPSPowerUpSelfTest) {}

TEST(HMACTest, HMACObjectReuse) {}

TEST(HMACTest, Verify) {}

TEST(HMACTest, EmptyKey) {}

TEST(HMACTest, TooLong) {}

TEST(HMACTest, Bytes) {}