[][src]Struct keybase_keystore::KeyStore

pub struct KeyStore { /* fields omitted */ }

Implementations

impl KeyStore[src]

pub async fn open<T: AsRef<Path>>(path: T) -> Result<Self, Error>[src]

Opens a keystore.

pub async fn apply_mask<'_, '_>(
    &'_ self,
    mask: &'_ Mask,
    next_gen: u16
) -> Result<(), Error>
[src]

Creates a new generation from a password mask.

pub async fn gen<'_>(&'_ self) -> u16[src]

Returns the generation number.

pub async fn is_initialized<'_>(&'_ self) -> bool[src]

Checks if the keystore is initialized.

pub async fn initialize<'_, '_, '_>(
    &'_ self,
    dk: &'_ DeviceKey,
    pass: &'_ Password,
    force: bool
) -> Result<(), Error>
[src]

Initializes the keystore.

pub async fn unlock<'_, '_>(
    &'_ self,
    pass: &'_ Password
) -> Result<DeviceKey, Error>
[src]

Unlocking the keystore makes the random key decryptable.

pub async fn lock<'_>(&'_ self) -> Result<(), Error>[src]

Locks the keystore by zeroizing the noise file. This makes the encrypted random key undecryptable without a password.

pub async fn device_key<'_>(&'_ self) -> Result<DeviceKey, Error>[src]

The random key is used to decrypt the device key.

NOTE: Only works if the keystore was unlocked.

pub async fn password<'_>(&'_ self) -> Result<Password, Error>[src]

The random key is used to recover the password.

NOTE: Only works if the keystore was unlocked.

pub async fn public<'_>(&'_ self) -> Result<PublicDeviceKey, Error>[src]

Returns the public device key.

pub async fn change_password_mask<'_, '_>(
    &'_ self,
    password: &'_ Password
) -> Result<Mask, Error>
[src]

Change password.

Auto Trait Implementations

impl !RefUnwindSafe for KeyStore

impl Send for KeyStore

impl Sync for KeyStore

impl Unpin for KeyStore

impl UnwindSafe for KeyStore

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> 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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,