# std.crypto.ecdsa: use separate function for null seed \(\#20953\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a6486492bed6ec840203cc88e0b30149dc72ad62)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a6486492bed6ec840203cc88e0b30149dc72ad62

Requested commit: a6486492bed6ec840203cc88e0b30149dc72ad62

Commit: a6486492bed6ec840203cc88e0b30149dc72ad62

Tree: 1fa230421f07d3264a9a88789c5686a5aa3f52c6

Author: Jakub Dóka

Committer: GitHub

## Message

```
std.crypto.ecdsa: use separate function for null seed (#20953)

Due 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 commit changes the API of the problematic function and moves the random seed generation to a new utility function.
```

## Parents

- [ebd0c6ffd0eb91f7a2838d6a17bf5344d539d3c6](https://git.cafe/gitcafe/zig/commit/ebd0c6ffd0eb91f7a2838d6a17bf5344d539d3c6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a6486492bed6ec840203cc88e0b30149dc72ad62?format=markdown)
