[][src]Struct secret_keeper_prompt::PromptKeeper

pub struct PromptKeeper {}

PromptKeeper Prompts user on console terminal for password. When encrypting (e.g., key creation), user is prompted twice and operation does not proceed if passwords are not equal.

Implementations

impl PromptKeeper[src]

pub fn new_default() -> Self[src]

creates a prompt keeper with default options

pub async fn register(self) -> Result<(), Error>[src]

register with SecretKeeper so it can be discovered with SecretKeeper::for_uri

Trait Implementations

impl Debug for PromptKeeper[src]

impl SecretKeeper for PromptKeeper[src]

fn get_scheme(&self) -> &str[src]

Returns uri used to initialize this keeper

fn wrap<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    _uri: &'life1 str,
    nonce: &'life2 [u8],
    key: &'life3 [u8]
) -> Pin<Box<dyn Future<Output = Result<WrappedKey, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Encrypts key with a passphrase-generated key Returned encrypted key is stringified with bech32.

fn unwrap<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    nonce: &'life1 [u8],
    wk: &'life2 WrappedKey
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Unwraps and decrypts key with a passphrase-generated key

Auto Trait Implementations

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.