2023-07-23 12:13:09 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
#include <vector>
|
|
|
|
#include <cstdint>
|
2023-07-25 16:26:35 +02:00
|
|
|
#include <cstddef>
|
2023-07-23 12:13:09 +02:00
|
|
|
|
|
|
|
// public key or secret key, or conf uid
|
|
|
|
struct ToxKey {
|
|
|
|
std::array<std::uint8_t, 32> data;
|
|
|
|
|
|
|
|
ToxKey(void) = default;
|
|
|
|
ToxKey(const std::vector<std::uint8_t>& v);
|
|
|
|
ToxKey(const std::uint8_t* d, std::size_t s);
|
|
|
|
|
2023-07-25 12:46:00 +02:00
|
|
|
bool operator==(const ToxKey& other) const { return data == other.data; }
|
|
|
|
bool operator!=(const ToxKey& other) const { return data != other.data; }
|
2023-07-23 12:13:09 +02:00
|
|
|
|
|
|
|
bool operator<(const ToxKey& other) const;
|
|
|
|
|
|
|
|
constexpr std::size_t size(void) const { return data.size(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
//std::ostream& operator<<(std::ostream& out, const SHA1Digest& v);
|
|
|
|
|