Crypto engine design enhancements and new library entry point

This commit is contained in:
Gu://em_ 2026-06-15 15:23:41 +02:00
parent cd83af4ef9
commit 693d7cfe51
9 changed files with 132 additions and 45 deletions

View file

@ -0,0 +1,21 @@
pub const Implementation = struct {
pub const KEY_SIZE = 32;
pub const SIGNATURE_SIZE = 64;
sign: *const fn (key: *const [KEY_SIZE]u8, data: *const []const u8, signature_out: *const [SIGNATURE_SIZE]u8) void,
verify: *const fn (key: *const [KEY_SIZE]u8, data: *const []const u8, signature: *const [SIGNATURE_SIZE]u8) void,
};
// TODO
pub const defaultImplementation = struct {
fn sign(key: *const [32]u8, data: *const []const u8, signature_out: *const [64]u8) void {
_ = key;
_ = data;
_ = signature_out;
}
fn verify(signature: *const [64]u8, data: *const []const u8) void {
_ = signature;
_ = data;
}
};