pub struct FsVerityDescriptor<'a> { /* private fields */ }Expand description
A descriptor struct for fsverity. It does not own the bytes backing it.
Implementations§
Source§impl<'a> FsVerityDescriptor<'a>
impl<'a> FsVerityDescriptor<'a>
Sourcepub fn from_bytes(bytes: &'a [u8], block_size: usize) -> Result<Self, Error>
pub fn from_bytes(bytes: &'a [u8], block_size: usize) -> Result<Self, Error>
Create a descriptor from the raw bytes of the entire block-aligned fsverity data.
pub fn digest_len(&self) -> usize
pub fn digest_algorithm(&self) -> HashAlgorithm
pub fn block_size(&self) -> usize
pub fn file_size(&self) -> usize
pub fn root_digest(&self) -> &'a [u8] ⓘ
pub fn salt(&self) -> &'a [u8] ⓘ
Sourcepub fn hasher(&self) -> FsVerityHasher
pub fn hasher(&self) -> FsVerityHasher
Return a hasher configured based on this descriptor.
Sourcepub fn leaf_digests(&self) -> Result<&'a [u8], Error>
pub fn leaf_digests(&self) -> Result<&'a [u8], Error>
A slice of all the leaf digests required for the file.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FsVerityDescriptor<'a>
impl<'a> RefUnwindSafe for FsVerityDescriptor<'a>
impl<'a> Send for FsVerityDescriptor<'a>
impl<'a> Sync for FsVerityDescriptor<'a>
impl<'a> Unpin for FsVerityDescriptor<'a>
impl<'a> UnwindSafe for FsVerityDescriptor<'a>
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