chromium/device/fido/large_blob_unittest.cc

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

#include "device/fido/large_blob.h"

#include <optional>

#include "device/fido/fido_parsing_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace device {

namespace {

class FidoLargeBlobTest : public testing::Test {};

// An empty CBOR array (0x80) followed by LEFT(SHA-256(h'80'), 16).
const std::array<uint8_t, 17> kValidEmptyLargeBlobArray =;

// Something that is not an empty CBOR array (0x10) followed by
// LEFT(SHA-256(h'10'), 16).
const std::array<uint8_t, 17> kInvalidLargeBlobArray =;

// An "valid" CBOR large blob array with two entries. The first entry is not a
// valid large blob map structure. The second entry is valid.
const std::array<uint8_t, 45> kValidLargeBlobArray =;

TEST_F(FidoLargeBlobTest, VerifyLargeBlobArrayIntegrityValid) {}

TEST_F(FidoLargeBlobTest, VerifyLargeBlobArrayIntegrityInvalid) {}

TEST_F(FidoLargeBlobTest, LargeBlobArrayReader_MaterializeEmpty) {}

TEST_F(FidoLargeBlobTest, LargeBlobArrayReader_MaterializeInvalidCbor) {}

TEST_F(FidoLargeBlobTest, LargeBlobArrayReader_MaterializeInvalidHash) {}

TEST_F(FidoLargeBlobTest, LargeBlobArrayReader_MaterializeValid) {}

// Test popping the large blob array in a fragment size that does not evenly
// divide the length of the array.
TEST_F(FidoLargeBlobTest, LargeBlobArrayWriter_PopUnevenly) {}

// Test popping the large blob array in a fragment size that evenly divides the
// length of the array.
TEST_F(FidoLargeBlobTest, LargeBlobArrayFragments_PopEvenly) {}

}  // namespace

}  // namespace device