Updated the crypto module to work with the new Ed25519 changes

This commit is contained in:
Gu://em_ 2026-07-08 17:18:56 +02:00
parent 4c7669785f
commit 7d86c901e3

View file

@ -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,
};
}