pub struct Digest {
pub algorithm: HashAlgorithm,
/* private fields */
}
Expand description
Wrapper around a IMA digest value.
Fields
algorithm: HashAlgorithm
Implementations
sourceimpl Digest
impl Digest
sourcepub fn new(algorithm: HashAlgorithm, value: &[u8]) -> Result<Self>
pub fn new(algorithm: HashAlgorithm, value: &[u8]) -> Result<Self>
Creates a new Digest
with algorithm
and value
.
sourcepub fn value(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn value(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Retrieves the value held in this Digest
.
sourcepub fn start(algorithm: HashAlgorithm) -> Self
pub fn start(algorithm: HashAlgorithm) -> Self
Returns a pre-defined digest value used to indicate the start of the IMA measurement list.
sourcepub fn ff(algorithm: HashAlgorithm) -> Self
pub fn ff(algorithm: HashAlgorithm) -> Self
Returns a pre-defined digest value used to indicate the ToMToU error in the IMA measurement list.
Trait Implementations
sourceimpl EncodeLegacy for Digest
impl EncodeLegacy for Digest
sourcefn encode_legacy(&self, writer: &mut dyn Write) -> Result<()>
fn encode_legacy(&self, writer: &mut dyn Write) -> Result<()>
Encodes this type in legacy mode and writes the output to
writer
.impl Eq for Digest
impl StructuralEq for Digest
impl StructuralPartialEq for Digest
Auto Trait Implementations
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnwindSafe for Digest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more