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, such info can be 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 files 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.
Noneempty datamap
Methods
impl DataMap[src]
fn len(&self) -> u64
Original (pre-encryption) size of file in DataMap.
fn get_chunks(&self) -> Vec<ChunkDetails>
Returns the list of chunks pre and post encryption hashes if present.
fn get_sorted_chunks(&self) -> Vec<ChunkDetails>
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
Whether the content is stored as chunks or as raw data.
Trait Implementations
impl Clone for DataMap[src]
fn clone(&self) -> DataMap
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Ord for DataMap[src]
fn cmp(&self, __arg_0: &DataMap) -> Ordering
This method returns an Ordering between self and other. Read more
impl PartialOrd for DataMap[src]
fn partial_cmp(&self, __arg_0: &DataMap) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &DataMap) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &DataMap) -> bool
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
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &DataMap) -> bool
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Eq for DataMap[src]
impl PartialEq for DataMap[src]
fn eq(&self, __arg_0: &DataMap) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &DataMap) -> bool
This method tests for !=.