[−][src]Struct keybase_keystore::KeyStore
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]
&'_ self,
mask: &'_ Mask,
next_gen: u16
) -> Result<(), Error>
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]
&'_ self,
dk: &'_ DeviceKey,
pass: &'_ Password,
force: bool
) -> Result<(), Error>
Initializes the keystore.
pub async fn unlock<'_, '_>(
&'_ self,
pass: &'_ Password
) -> Result<DeviceKey, Error>
[src]
&'_ self,
pass: &'_ Password
) -> Result<DeviceKey, Error>
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]
&'_ self,
password: &'_ Password
) -> Result<Mask, Error>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,