pub struct Master { /* private fields */ }Expand description
Key derived from a master passphrase, which the passphrases for all domains and users are derived from.
Implementations§
Source§impl Master
impl Master
Sourcepub fn derive(
version: u32,
level: u32,
passphrase: &str,
seed: &[u8],
) -> Result<Self, Error>
pub fn derive( version: u32, level: u32, passphrase: &str, seed: &[u8], ) -> Result<Self, Error>
Derives the key from a master passphrase, with the cost of a level. With a seed (which can be empty for none), the master passphrase alone is not enough to derive anything.
This takes a while, and as much memory as the level says.
Sourcepub fn derive_with_cost(
version: u32,
cost: Cost,
passphrase: &str,
seed: &[u8],
) -> Result<Self, Error>
pub fn derive_with_cost( version: u32, cost: Cost, passphrase: &str, seed: &[u8], ) -> Result<Self, Error>
Derives the key from a master passphrase with a cost that is not that of a level.
Nothing else derives the same from the master passphrase. This is for tests, which can use a cost that is small.
Trait Implementations§
impl StructuralPartialEq for Master
Auto Trait Implementations§
impl Forget for Master
impl Freeze for Master
impl Move for Master
impl RefUnwindSafe for Master
impl Send for Master
impl Sync for Master
impl Unpin for Master
impl UnsafeUnpin for Master
impl UnwindSafe for Master
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