pub struct SealedBlobOpener { /* private fields */ }Expand description
Opens a sealed blob’s chunks in any order. A chunk that opens is authentic — the tag covers its bytes, its position, and the header that framed it — so decryption is the whole verification and no separate hash is read.
Implementations§
Source§impl SealedBlobOpener
impl SealedBlobOpener
pub fn header(&self) -> SealedBlobHeader
Sourcepub fn open_chunk(
&self,
index: u64,
sealed: &[u8],
) -> Result<Vec<u8>, SealedBlobError>
pub fn open_chunk( &self, index: u64, sealed: &[u8], ) -> Result<Vec<u8>, SealedBlobError>
Open chunk index from exactly its sealed bytes. A length the header
does not assign that index is refused before the cipher runs — the bytes
are not that chunk, whatever they authenticate as.
Sourcepub fn open_chunks(
&self,
chunks: Range<u64>,
sealed: &[u8],
) -> Result<Vec<u8>, SealedBlobError>
pub fn open_chunks( &self, chunks: Range<u64>, sealed: &[u8], ) -> Result<Vec<u8>, SealedBlobError>
Open every chunk in chunks from the contiguous sealed bytes covering
them — the span SealedBlobHeader::sealed_span names for the same
range — and return their whole plaintext. Chunks are opened one at a
time, so a tampered chunk fails only the reads that touch it.
Auto Trait Implementations§
impl Freeze for SealedBlobOpener
impl RefUnwindSafe for SealedBlobOpener
impl Send for SealedBlobOpener
impl Sync for SealedBlobOpener
impl Unpin for SealedBlobOpener
impl UnsafeUnpin for SealedBlobOpener
impl UnwindSafe for SealedBlobOpener
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