108 {
109 auto json = std::string("{\"origin\":\"https://") +
111 "\",\"type\":\"webauthn.get\",\"challenge\":\"" +
113 "\"}";
114 std::vector<uint8_t> auth_data(37);
116
119 e.
write((
char*)auth_data.data(), auth_data.size());
120 e.
write(client_data_hash.data(), client_data_hash.data_size());
122
123 char serialized_sig[4096];
124 datastream<char*> sig_ds(serialized_sig, sizeof(serialized_sig));
129 sig_ds.seekp(0);
130
134 }
compact_signature sign_compact(const fc::sha256 &digest) const
void write(const char *d, uint32_t dlen)
static sha256 hash(const char *d, uint32_t dlen)
const char * data() const
void unpack(Stream &s, std::deque< T > &value)
void pack(Stream &s, const std::deque< T > &value)
fc::sha256 digest(const T &value)
std::string base64url_encode(unsigned char const *bytes_to_encode, unsigned int in_len)
constexpr std::size_t get_index()
static const fc::sha256 _origin_hash
memcpy((char *) pInfo->slotDescription, s, l)