nettext/src/crypto/mod.rs

22 lines
441 B
Rust
Raw Normal View History

2022-11-17 21:53:36 +00:00
//! Helpers to use cryptographic data types in nettext
#[cfg(feature = "blake2")]
mod b2;
#[cfg(feature = "blake2")]
pub use b2::*;
#[cfg(feature = "ed25519-dalek")]
mod ed25519;
#[cfg(feature = "ed25519-dalek")]
pub use ed25519::*;
/// An error corresponding to a cryptographic check that failed
pub enum CryptoError {
2022-11-17 22:58:44 +00:00
/// A hash verification failed
2022-11-17 21:53:36 +00:00
InvalidHash,
2022-11-17 22:58:44 +00:00
/// A signature verification failed
2022-11-17 21:53:36 +00:00
InvalidSignature,
}