From deb40ae5c1cd74d7bbd89c196356c0c8a6abaecc Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 5 Oct 2017 18:33:10 -0700 Subject: [PATCH] ircd::ed25519: Use fixed_buffers. --- include/ircd/ed25519.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/include/ircd/ed25519.h b/include/ircd/ed25519.h index 44f24d203..09930c9a6 100644 --- a/include/ircd/ed25519.h +++ b/include/ircd/ed25519.h @@ -50,19 +50,23 @@ class ircd::ed25519::sk }; struct ircd::ed25519::pk -:std::array +:fixed_mutable_raw_buffer { - using array_type = std::array; - bool verify(const const_raw_buffer &msg, const sig &) const; - using array_type::array_type; - pk(): array_type{0} {} + using fixed_mutable_raw_buffer::fixed_mutable_raw_buffer; + + pk() + :fixed_mutable_raw_buffer{nullptr} + {} }; struct ircd::ed25519::sig -:std::array +:fixed_mutable_raw_buffer { - using array_type = std::array; - using array_type::array_type; + using fixed_mutable_raw_buffer::fixed_mutable_raw_buffer; + + sig() + :fixed_mutable_raw_buffer{nullptr} + {} };