zig icon indicating copy to clipboard operation
zig copied to clipboard

Ecdsa cross compilation fix + api change

Open jakubDoka opened this issue 6 months ago • 0 comments

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).

jakubDoka avatar Aug 05 '24 22:08 jakubDoka