Enum self_encryption::DataMap
[−]
[src]
pub enum DataMap { Chunks(Vec<ChunkDetails>), Content(Vec<u8>), None, }
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.
Content(Vec<u8>)
Very small files (less than 3072 bytes, 3 * MIN_CHUNK_SIZE) are not split into chunks and are put in here in their entirety.
None
empty datamap
Methods
impl DataMap
[src]
fn len(&self) -> u64
[src]
Original (pre-encryption) size of file in DataMap.
fn get_chunks(&self) -> Vec<ChunkDetails>
[src]
Returns the list of chunks pre and post encryption hashes if present.
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.
fn has_chunks(&self) -> bool
[src]
Whether the content is stored as chunks or as raw data.
fn chunks_sort(chunks: &mut [ChunkDetails])
[src]
Sorts list of chunks using quicksort
Trait Implementations
impl PartialEq for DataMap
[src]
fn eq(&self, __arg_0: &DataMap) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DataMap) -> bool
[src]
This method tests for !=
.
impl Eq for DataMap
[src]
impl PartialOrd for DataMap
[src]
fn partial_cmp(&self, __arg_0: &DataMap) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &DataMap) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &DataMap) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &DataMap) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &DataMap) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for DataMap
[src]
fn cmp(&self, __arg_0: &DataMap) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Clone for DataMap
[src]
fn clone(&self) -> DataMap
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more