# crypto.Ed25519.KeyPair: return an error rather than assert · gitcafe/zig

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

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

Visibility: public

Requested revision: 65e7ede4994237f160e8db558e74da113f886f98

Requested commit: 65e7ede4994237f160e8db558e74da113f886f98

Commit: 65e7ede4994237f160e8db558e74da113f886f98

Tree: ccc4491c0bfc8ff0159acd71f46976efd48203f0

Author: Frank Denis

Committer: Alex Rønne Petersen

## Message

```
crypto.Ed25519.KeyPair: return an error rather than assert

When runtime safety is turned on, `Ed25519.fromSecretKey()` can
currently hit an assertion if the format of the secret key is
invalid.

Return an error instead, so that applications can recover.

```

## Parents

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

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