pub struct PassphraseRecovery;Expand description
Passphrase-based recovery using Argon2id key derivation + AES-256-GCM.
§Example
ⓘ
use hyde::recovery::PassphraseRecovery;
let strategy = PassphraseRecovery;
let backup = ctx.backup(&protected, &strategy, Some(b"my-passphrase"))?;
let restored = ctx.restore(&backup, &protected.ciphertext, &strategy, b"my-passphrase")?;Trait Implementations§
Source§impl RecoveryStrategy for PassphraseRecovery
impl RecoveryStrategy for PassphraseRecovery
Source§fn backup(
&self,
key: &WrappedKey,
secret: Option<&[u8]>,
) -> Result<BackupBundle>
fn backup( &self, key: &WrappedKey, secret: Option<&[u8]>, ) -> Result<BackupBundle>
Create an encrypted backup of
key. Read moreSource§fn restore(&self, bundle: &BackupBundle, secret: &[u8]) -> Result<WrappedKey>
fn restore(&self, bundle: &BackupBundle, secret: &[u8]) -> Result<WrappedKey>
Restore a
WrappedKey from a backup. Read moreSource§fn recovery_type(&self) -> RecoveryType
fn recovery_type(&self) -> RecoveryType
Return the recovery type identifier.
Auto Trait Implementations§
impl Freeze for PassphraseRecovery
impl RefUnwindSafe for PassphraseRecovery
impl Send for PassphraseRecovery
impl Sync for PassphraseRecovery
impl Unpin for PassphraseRecovery
impl UnsafeUnpin for PassphraseRecovery
impl UnwindSafe for PassphraseRecovery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more