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

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

Methods

impl DataMap
[src]

Original (pre-encryption) size of file in DataMap.

Important traits for Vec<u8>

Returns the list of chunks pre and post encryption hashes if present.

Important traits for Vec<u8>

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.

Whether the content is stored as chunks or as raw data.

Sorts list of chunks using quicksort

Trait Implementations

impl PartialEq for DataMap
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for DataMap
[src]

impl PartialOrd for DataMap
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Clone for DataMap
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for DataMap
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for DataMap

impl Sync for DataMap