[−][src]Struct secret_keeper_prompt::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]
&'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,
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]
&'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,
Unwraps and decrypts key with a passphrase-generated key
#[must_use]fn init_cipher<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ckind: CipherKind,
nonce: &'life1 [u8],
wrapped: Option<&'life2 WrappedKey>
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Cipher + 'static>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
ckind: CipherKind,
nonce: &'life1 [u8],
wrapped: Option<&'life2 WrappedKey>
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Cipher + 'static>, Error>> + 'async_trait + Send>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn as_create(&self) -> Result<&dyn Create, Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for PromptKeeper
impl Send for PromptKeeper
impl Sync for PromptKeeper
impl Unpin for PromptKeeper
impl UnwindSafe for PromptKeeper
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>,