#[repr(u8)]pub enum InnerHashAlgorithm {
Sha256 = 1,
Sha512 = 2,
}
Expand description
Enum of the supported inner hash algorithms.
The Default
value is Sha256
, corresponding to the default hash algorithm in the fsverity
tools, and to the
default generic parameter of FsVerityDigest
.
This enum supports conversion to string using std::fmt::Display
and from a string using parse_display::FromStr
.
It also supports conversion to integer using as u8
and from integer using TryFromPrimitive
). These integers values
match the hash algorithm numbering used in the fsverity kernel API.
Variants§
Sha256 = 1
As string: sha256
. As number: FS_VERITY_HASH_ALG_SHA256
from the kernel API.
Sha512 = 2
As string: sha512
. As number: FS_VERITY_HASH_ALG_SHA512
from the kernel API.
Trait Implementations§
Source§impl Clone for InnerHashAlgorithm
impl Clone for InnerHashAlgorithm
Source§fn clone(&self) -> InnerHashAlgorithm
fn clone(&self) -> InnerHashAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InnerHashAlgorithm
impl Debug for InnerHashAlgorithm
Source§impl Default for InnerHashAlgorithm
impl Default for InnerHashAlgorithm
Source§impl Display for InnerHashAlgorithm
impl Display for InnerHashAlgorithm
Source§impl FromStr for InnerHashAlgorithm
impl FromStr for InnerHashAlgorithm
Source§impl PartialEq for InnerHashAlgorithm
impl PartialEq for InnerHashAlgorithm
Source§impl TryFrom<u8> for InnerHashAlgorithm
impl TryFrom<u8> for InnerHashAlgorithm
Source§type Error = TryFromPrimitiveError<InnerHashAlgorithm>
type Error = TryFromPrimitiveError<InnerHashAlgorithm>
The type returned in the event of a conversion error.
impl Copy for InnerHashAlgorithm
impl Eq for InnerHashAlgorithm
impl StructuralPartialEq for InnerHashAlgorithm
Auto Trait Implementations§
impl Freeze for InnerHashAlgorithm
impl RefUnwindSafe for InnerHashAlgorithm
impl Send for InnerHashAlgorithm
impl Sync for InnerHashAlgorithm
impl Unpin for InnerHashAlgorithm
impl UnwindSafe for InnerHashAlgorithm
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