11namespace fc {
namespace crypto {
namespace webauthn {
29 bool valid()
const {
return rpid.size(); }
33 public_key_data(
p), user_verification_type(t), rpid(
s) {
39 return public_key_data == o.public_key_data &&
40 user_verification_type == o.user_verification_type &&
44 return std::tie(public_key_data, user_verification_type, rpid) < std::tie(o.public_key_data, o.user_verification_type, o.rpid);
47 template<
typename Stream>
55 template<
typename Stream>
82 compact_signature(
s), auth_data(
a), client_json(
j) {}
89 return auth_data.size() + client_json.size();
93 return compact_signature == o.compact_signature &&
94 auth_data == o.auth_data &&
95 client_json == o.client_json;
99 return std::tie(compact_signature, auth_data, client_json) < std::tie(o.compact_signature, o.auth_data, o.client_json);
104 return *(
size_t*)&compact_signature.
data[32-
sizeof(
size_t)] + *(
size_t*)&compact_signature.
data[64-
sizeof(
size_t)];
111 std::vector<uint8_t> auth_data;
112 std::string client_json;
public_key serialize() const
public_key(const public_key_data_type &p, const user_presence_t &t, const std::string &s)
friend Stream & operator<<(Stream &ds, const public_key &k)
friend Stream & operator>>(Stream &ds, public_key &k)
fc::array< char, 33 > public_key_data_type
bool operator<(const public_key &o) const
bool operator==(const public_key &o) const
signature serialize() const
public_key recover(const sha256 &digest, bool check_canonical) const
bool operator<(const signature &o) const
bool operator==(const signature &o) const
signature(const fc::crypto::r1::compact_signature &s, const std::vector< uint8_t > &a, const std::string &j)
size_t variable_size() const
Concept for reading and writing characters.
void unpack(Stream &s, std::deque< T > &value)
void pack(Stream &s, const std::deque< T > &value)
fc::sha256 digest(const T &value)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
static bool apply(const webauthn::public_key &a, const webauthn::public_key &b)
static bool apply(const webauthn::signature &a, const webauthn::signature &b)
static bool apply(const webauthn::public_key &a, const webauthn::public_key &b)
static bool apply(const webauthn::signature &a, const webauthn::signature &b)
defines visit functions for T Unless this is specialized, visit() will not be defined for T.