Check the PIN when pairing
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "boost/pfr/core.hpp"
|
||||
#include "boost/pfr/tuple_size.hpp"
|
||||
#include "smp.h"
|
||||
#include <array>
|
||||
#include <boost/pfr.hpp>
|
||||
#include <chrono>
|
||||
@@ -903,6 +904,35 @@ struct serialization_traits<data_holder>
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct serialization_traits<crypto::bignum>
|
||||
{
|
||||
static constexpr void type_hash(details::hash_context & h)
|
||||
{
|
||||
h.feed("bignum");
|
||||
}
|
||||
|
||||
static void serialize(const crypto::bignum & value, serialization_packet & packet)
|
||||
{
|
||||
serialization_traits<std::string>::serialize(value.to_data(), packet);
|
||||
}
|
||||
|
||||
static crypto::bignum deserialize(deserialization_packet & packet)
|
||||
{
|
||||
return crypto::bignum::from_data(serialization_traits<std::string>::deserialize(packet));
|
||||
}
|
||||
|
||||
static bool consteval is_trivially_serializable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static size_t size(const crypto::bignum & value)
|
||||
{
|
||||
return 2 + value.data_size();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
constexpr uint64_t serialization_type_hash(int revision)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user