Skip to main content

substrate/crypto/
mod.rs

1//! Cryptographic utilities for CMN.
2
3pub mod hash;
4pub mod hub;
5pub mod key;
6pub mod signature;
7
8#[derive(Debug, Clone, PartialEq, Eq)]
9pub struct AlgorithmBytes<A> {
10    pub algorithm: A,
11    pub bytes: Vec<u8>,
12}
13
14pub use hash::{compute_blake3_hash, format_hash, parse_hash, HashAlgorithm};
15pub use key::{format_key, parse_key, KeyAlgorithm};
16pub use signature::{
17    compute_signature, format_signature, parse_signature, verify_json_signature, verify_signature,
18    SignatureAlgorithm,
19};