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]

[src]

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

[src]

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

[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.

[src]

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

[src]

Sorts list of chunks using quicksort

Trait Implementations

impl PartialEq for DataMap
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for DataMap
[src]

impl PartialOrd for DataMap
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[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]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl Clone for DataMap
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for DataMap
[src]

[src]

Formats the value using the given formatter.