Struct safe_core::MDataInfo [] [src]

pub struct MDataInfo {
    pub name: XorName,
    pub type_tag: u64,
    pub enc_info: Option<(Key, Option<Nonce>)>,
    pub new_enc_info: Option<(Key, Option<Nonce>)>,
}

Information allowing to locate and access mutable data on the network.

Fields

Name of the data where the directory is stored.

Type tag of the data where the directory is stored.

Key to encrypt/decrypt the directory content. and the nonce to be used for keys

Future encryption info, used for two-phase data reencryption.

Methods

impl MDataInfo
[src]

Construct MDataInfo for private (encrypted) data with a provided private key.

Construct MDataInfo for public data.

Generate random MDataInfo for private (encrypted) mutable data.

Generate random MDataInfo for public mutable data.

Returns the encryption key, if any.

Returns the nonce, inf any.

encrypt the the key for the mdata entry accordingly

encrypt the value for this mdata entry accordingly

decrypt key or value of this mdata entry

Start the encryption info re-generation by populating the new_enc_info field with random keys.

Commit the encryption info re-generation by replacing the current encryption info with new_enc_info (if any).

Abort the encryption info regeneration by clearing the new_enc_info field.

Trait Implementations

impl Clone for MDataInfo
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for MDataInfo
[src]

Formats the value using the given formatter.

impl PartialEq for MDataInfo
[src]

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

This method tests for !=.