pub enum HashAlgorithm {
Sha256,
Sha384,
}Expand description
Closed set of hash algorithms (V0.1).
Variants§
Implementations§
Source§impl HashAlgorithm
impl HashAlgorithm
Sourcepub fn cbor_enum(self) -> u64
pub fn cbor_enum(self) -> u64
Engine-local CBOR enum value (NOT the COSE number; mapping is explicit in crypto).
pub fn from_cbor_enum(v: u64) -> Result<Self, ProofError>
pub fn name(self) -> &'static str
pub fn from_name(s: &str) -> Result<Self, ProofError>
pub fn digest_len(self) -> usize
Trait Implementations§
Source§impl Clone for HashAlgorithm
impl Clone for HashAlgorithm
impl Copy for HashAlgorithm
Source§impl Debug for HashAlgorithm
impl Debug for HashAlgorithm
impl Eq for HashAlgorithm
Source§impl Hash for HashAlgorithm
impl Hash for HashAlgorithm
Source§impl PartialEq for HashAlgorithm
impl PartialEq for HashAlgorithm
impl StructuralPartialEq for HashAlgorithm
Auto Trait Implementations§
impl Freeze for HashAlgorithm
impl RefUnwindSafe for HashAlgorithm
impl Send for HashAlgorithm
impl Sync for HashAlgorithm
impl Unpin for HashAlgorithm
impl UnsafeUnpin for HashAlgorithm
impl UnwindSafe for HashAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more