Skip to content

Commit

Permalink
Incorporate libcrux-hkdf Errors in libcrux::hacl::Error type
Browse files Browse the repository at this point in the history
  • Loading branch information
jschneider-bensch committed Jun 10, 2024
1 parent 3fe64a1 commit 42a37b5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hacl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub enum Error {
Curve25519(curve25519::Error),
P256(p256::Error),
Ed25519(ed25519::Error),
Hkdf(libcrux_hkdf::Error),
}

impl From<chacha20_poly1305::Error> for Error {
Expand All @@ -47,6 +48,12 @@ impl From<p256::Error> for Error {
}
}

impl From<libcrux_hkdf::Error> for Error {
fn from(val: libcrux_hkdf::Error) -> Self {
Error::Hkdf(val)
}
}

impl From<ed25519::Error> for Error {
fn from(val: ed25519::Error) -> Self {
Error::Ed25519(val)
Expand Down

0 comments on commit 42a37b5

Please sign in to comment.