[][src]Struct safe_core::client::account::Account

pub struct Account {
    pub maid_keys: ClientKeys,
    pub access_container: MDataInfo,
    pub config_root: MDataInfo,
    pub root_dirs_created: bool,
}

Object representing the User Account information on the network.

Fields

maid_keys: ClientKeys

The User Account Keys.

access_container: MDataInfo

The user's access container.

config_root: MDataInfo

The user's configuration directory.

root_dirs_created: bool

Set to true when all root and standard containers have been created successfully. false signifies that previous attempt might have failed - check on login.

Implementations

impl Account[src]

pub fn new(maid_keys: ClientKeys) -> Result<Self, CoreError>[src]

Creates new Account with a provided set of keys.

pub fn encrypt(&self, password: &[u8], pin: &[u8]) -> Result<Vec<u8>, CoreError>[src]

Symmetrically encrypts Account using User's credentials.

Credentials are passed through key-derivation-function first.

pub fn decrypt(
    encrypted_self: &[u8],
    password: &[u8],
    pin: &[u8]
) -> Result<Self, CoreError>
[src]

Symmetrically decrypts Account using User's credentials.

Credentials are passed through key-derivation-function first.

pub fn generate_network_id(
    keyword: &[u8],
    pin: &[u8]
) -> Result<XorName, CoreError>
[src]

Generates User's Identity for the network using supplied credentials in a deterministic way. This is similar to the username in various places.

Trait Implementations

impl Clone for Account[src]

impl Debug for Account[src]

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

impl PartialEq<Account> for Account[src]

impl Serialize for Account[src]

impl StructuralPartialEq for Account[src]

Auto Trait Implementations

impl RefUnwindSafe for Account

impl Send for Account

impl Sync for Account

impl Unpin for Account

impl UnwindSafe for Account

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,