Trait chain_crypto::digest::DigestAlg
source · pub trait DigestAlg {
type DigestData: Clone + PartialEq + Hash + Send + AsRef<[u8]>;
type DigestContext: Clone;
const HASH_SIZE: usize;
// Required methods
fn try_from_slice(slice: &[u8]) -> Result<Self::DigestData, Error>;
fn new() -> Self::DigestContext;
fn append_data(ctx: &mut Self::DigestContext, data: &[u8]);
fn finalize(ctx: Self::DigestContext) -> Self::DigestData;
}