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:
parent
51f5045c06
commit
deb40ae5c1
1 changed files with 12 additions and 8 deletions
|
@ -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}
|
||||
{}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue