Enum self_encryption::DataMap [−][src]
Holds the information that is required to recover the content of the encrypted file. Depending
on the file size, this is held as a vector of ChunkDetails
, or as raw data.
Variants
Chunks(Vec<ChunkDetails>)
If the file is large enough (larger than 3072 bytes, 3 * MIN_CHUNK_SIZE), this algorithm holds the list of the file’s chunks and corresponding hashes.
Very small files (less than 3072 bytes, 3 * MIN_CHUNK_SIZE) are not split into chunks and are put in here in their entirety.
empty datamap
Implementations
impl DataMap
[src]
pub fn len(&self) -> usize
[src]
Original (pre-encryption) size of file in DataMap.
pub fn get_chunks(&self) -> Vec<ChunkDetails>
[src]
Returns the list of chunks pre and post encryption hashes if present.
pub fn get_sorted_chunks(&self) -> Vec<ChunkDetails>
[src]
The algorithm requires this to be a sorted list to allow get_pad_iv_key to obtain the correct pre-encryption hashes for decryption/encryption.
pub fn has_chunks(&self) -> bool
[src]
Whether the content is stored as chunks or as raw data.
pub fn chunks_sort(chunks: &mut [ChunkDetails])
[src]
Sorts list of chunks using quicksort
Trait Implementations
impl Clone for DataMap
[src]
impl Debug for DataMap
[src]
impl<'de> Deserialize<'de> for DataMap
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for DataMap
[src]
impl Ord for DataMap
[src]
fn cmp(&self, other: &DataMap) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<DataMap> for DataMap
[src]
impl PartialOrd<DataMap> for DataMap
[src]
fn partial_cmp(&self, other: &DataMap) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for DataMap
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for DataMap
[src]
impl StructuralPartialEq for DataMap
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataMap
impl Send for DataMap
impl Sync for DataMap
impl Unpin for DataMap
impl UnwindSafe for DataMap
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,