zig
zig copied to clipboard
Ecdsa cross compilation fix + api change
Dude to the std.crypto.ecdsa.KeyPair.create
taking and optional of seed, even if the seed is generated, cross-compiling to the environments without standard random source (eg. wasm) (std.crypto.random.bytes
) will fail to compile.
This PR changes the API of the problematic function and moves the random seed generation to a new utility function.
The simplest workaround is copying the ECDSA file to my project and making the changes (to enjoy microscopic crypto wasm binary).