# std.crypto: make the key pair API creation consistent \(\#21955\) · gitcafe/zig

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

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

Visibility: public

Requested revision: 8a00bd4ce6a3f7f61dc93ed8fabfee47f32dadc5

Requested commit: 8a00bd4ce6a3f7f61dc93ed8fabfee47f32dadc5

Commit: 8a00bd4ce6a3f7f61dc93ed8fabfee47f32dadc5

Tree: 4645d6413534443546a3e9dda122614156942157

Author: Frank Denis

Committer: GitHub

## Message

```
std.crypto: make the key pair API creation consistent (#21955)

Our key pair creation API was ugly and inconsistent between ecdsa
keys and other keys.

The same `generate()` function can now be used to generate key pairs,
and that function cannot fail.

For deterministic keys, a `generateDeterministic()` function is
available for all key types.

Fix comments and compilation of the benchmark by the way.

Fixes #21002
```

## Parents

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

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