chromium/crypto/hmac.cc

// Copyright 2012 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 <algorithm>
#include <string>

#include "base/check.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/stl_util.h"
#include "crypto/openssl_util.h"
#include "crypto/secure_util.h"
#include "crypto/symmetric_key.h"
#include "third_party/boringssl/src/include/openssl/hmac.h"

namespace crypto {

HMAC::HMAC(HashAlgorithm hash_alg) :{}

HMAC::~HMAC() {}

size_t HMAC::DigestLength() const {}

bool HMAC::Init(const unsigned char* key, size_t key_length) {}

bool HMAC::Init(const SymmetricKey* key) {}

bool HMAC::Sign(std::string_view data,
                unsigned char* digest,
                size_t digest_length) const {}

bool HMAC::Sign(base::span<const uint8_t> data,
                base::span<uint8_t> digest) const {}

bool HMAC::Verify(std::string_view data, std::string_view digest) const {}

bool HMAC::Verify(base::span<const uint8_t> data,
                  base::span<const uint8_t> digest) const {}

bool HMAC::VerifyTruncated(std::string_view data,
                           std::string_view digest) const {}

bool HMAC::VerifyTruncated(base::span<const uint8_t> data,
                           base::span<const uint8_t> digest) const {}

}  // namespace crypto