Struct self_encryption::ChunkInfo
source · pub struct ChunkInfo {
pub index: usize,
pub dst_hash: XorName,
pub src_hash: XorName,
pub src_size: usize,
}
Expand description
This is - in effect - a partial decryption key for an encrypted chunk of data.
It holds pre- and post-encryption hashes as well as the original (pre-compression) size for a given chunk. This information is required for successful recovery of a chunk, as well as for the encryption/decryption of it’s two immediate successors, modulo the number of chunks in the corresponding DataMap.
Fields§
§index: usize
Index number (zero-based)
dst_hash: XorName
Post-encryption hash of chunk
src_hash: XorName
Pre-encryption hash of chunk
src_size: usize
Size before encryption and compression (any possible padding depending on cipher used alters this)
Trait Implementations§
source§impl<'de> Deserialize<'de> for ChunkInfo
impl<'de> Deserialize<'de> for ChunkInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for ChunkInfo
impl Ord for ChunkInfo
source§impl PartialEq for ChunkInfo
impl PartialEq for ChunkInfo
source§impl PartialOrd for ChunkInfo
impl PartialOrd for ChunkInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ChunkInfo
impl StructuralPartialEq for ChunkInfo
Auto Trait Implementations§
impl Freeze for ChunkInfo
impl RefUnwindSafe for ChunkInfo
impl Send for ChunkInfo
impl Sync for ChunkInfo
impl Unpin for ChunkInfo
impl UnwindSafe for ChunkInfo
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more