blob: a30c02e8bb77f80a53c022fc9228e82f4c64e3c9 [file] [log] [blame]
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_QUICK_PAIR_PAIRING_FAST_PAIR_FAST_PAIR_KEY_PAIR_H_
#define ASH_QUICK_PAIR_PAIRING_FAST_PAIR_FAST_PAIR_KEY_PAIR_H_
#include <stddef.h>
#include <stdint.h>
#include <array>
#include "base/component_export.h"
namespace {
constexpr int kPrivateKeyByteSize = 16;
constexpr int kPublicKeyByteSize = 64;
} // namespace
namespace ash {
namespace quick_pair {
namespace fast_pair_encryption {
// Key pair structure to represent public and private keys used for encryption/
// decryption.
struct COMPONENT_EXPORT(QUICK_PAIR_PAIRING) KeyPair {
KeyPair(std::array<uint8_t, kPrivateKeyByteSize> private_key,
std::array<uint8_t, kPublicKeyByteSize> public_key);
KeyPair(const KeyPair&) = delete;
KeyPair(KeyPair&&);
KeyPair& operator=(const KeyPair&) = delete;
KeyPair& operator=(KeyPair&&) = delete;
~KeyPair() = default;
const std::array<uint8_t, kPrivateKeyByteSize> private_key;
const std::array<uint8_t, kPublicKeyByteSize> public_key;
};
} // namespace fast_pair_encryption
} // namespace quick_pair
} // namespace ash
#endif // ASH_QUICK_PAIR_PAIRING_FAST_PAIR_FAST_PAIR_KEY_PAIR_H_