0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd::ed25519: Use fixed_buffers.

This commit is contained in:
Jason Volk 2017-10-05 18:33:10 -07:00
parent 51f5045c06
commit deb40ae5c1

View file

@ -50,19 +50,23 @@ class ircd::ed25519::sk
};
struct ircd::ed25519::pk
:std::array<uint8_t, PK_SZ>
:fixed_mutable_raw_buffer<PK_SZ>
{
using array_type = std::array<uint8_t, PK_SZ>;
bool verify(const const_raw_buffer &msg, const sig &) const;
using array_type::array_type;
pk(): array_type{0} {}
using fixed_mutable_raw_buffer<PK_SZ>::fixed_mutable_raw_buffer;
pk()
:fixed_mutable_raw_buffer<PK_SZ>{nullptr}
{}
};
struct ircd::ed25519::sig
:std::array<uint8_t, SIG_SZ>
:fixed_mutable_raw_buffer<SIG_SZ>
{
using array_type = std::array<uint8_t, SIG_SZ>;
using array_type::array_type;
using fixed_mutable_raw_buffer<SIG_SZ>::fixed_mutable_raw_buffer;
sig()
:fixed_mutable_raw_buffer<SIG_SZ>{nullptr}
{}
};