Struct safe_app::MDataInfo[][src]

pub struct MDataInfo {
    pub name: XorName,
    pub type_tag: u64,
    pub enc_info: Option<(Key, Nonce)>,
    pub new_enc_info: Option<(Key, 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 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, unless it's already populated.

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

Convert into C-representation.

Trait Implementations

impl<'de> Deserialize<'de> for MDataInfo
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Clone for MDataInfo
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl ReprC for MDataInfo
[src]

C representation of the type

Error type

Converts from a raw type into an owned type by cloning data

impl Debug for MDataInfo
[src]

Formats the value using the given formatter. Read more

impl Eq for MDataInfo
[src]

impl PartialEq<MDataInfo> for MDataInfo
[src]

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

This method tests for !=.

impl Serialize for MDataInfo
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl Send for MDataInfo

impl Sync for MDataInfo