Struct safe_core::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]

[src]

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

[src]

Construct MDataInfo for public data.

[src]

Generate random MDataInfo for private (encrypted) mutable data.

[src]

Generate random MDataInfo for public mutable data.

[src]

Returns the encryption key, if any.

[src]

Returns the nonce, inf any.

[src]

encrypt the key for the mdata entry accordingly

[src]

encrypt the value for this mdata entry accordingly

[src]

decrypt key or value of this mdata entry

[src]

Start the encryption info re-generation by populating the new_enc_info field with random keys, unless it's already populated.

[src]

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

[src]

Convert into C-representation.

Trait Implementations

impl Clone for MDataInfo
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for MDataInfo
[src]

[src]

Formats the value using the given formatter.

impl Eq for MDataInfo
[src]

impl PartialEq for MDataInfo
[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 ReprC for MDataInfo
[src]

C representation of the type

Error type

[src]

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