use thiserror::Error;
#[derive(Error, Debug)]
pub enum HashError {
#[error("invalid hash length {0} bytes, expected {1} bytes")]
InvalidLength(usize, usize),
#[error("invalid hex encoding in hash string")]
InvalidHexEncoding,
#[error("can not decode YASMF BLAKE3 hash")]
DecodingFailed,
#[error(transparent)]
YasmfHashError(#[from] yasmf_hash::error::Error),
#[error(transparent)]
FromHexError(#[from] hex::FromHexError),
}