From 7d86c901e39bdde285d39492546e13f503eaedc5 Mon Sep 17 00:00:00 2001 From: "Gu://em_" Date: Wed, 8 Jul 2026 17:18:56 +0200 Subject: [PATCH] Updated the crypto module to work with the new Ed25519 changes --- src/crypto.zig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/crypto.zig b/src/crypto.zig index 4fa74f6..e9813cd 100644 --- a/src/crypto.zig +++ b/src/crypto.zig @@ -44,15 +44,19 @@ pub const Engine = struct { // These functions must follow the same structure as the struct returned by this // function and its sub-structs. pub fn resolveEngine(comptime provider: PartialEngine) Engine { + + // Used by other engine components + const randomImpl = provider.random orelse RANDOM.defaultImplementation; + return .{ .aes_cbc256 = provider.aes_cbc256 orelse AES.CBC256_DefaultImplementation, - .ed25519 = provider.ed25519 orelse ED25519.DefaultImplementation, + .ed25519 = provider.ed25519 orelse ED25519.DefaultImplementation(randomImpl), .hkdf = provider.hkdf orelse HKDF.DefaultImplementation, .hmac = provider.hmac orelse HMAC.DefaultImplementation, .sha256 = provider.sha256 orelse SHA256.DefaultImplementation, .sha512 = provider.sha512 orelse SHA512.DefaultImplementation, .x25519 = provider.x25519 orelse X25519.DefaultImplementation, - .random = provider.random orelse RANDOM.DefaultImplementation, + .random = randomImpl, }; }