struct Argon2RawSettings {
iterations: u32,
memory: u32,
parallelism: u32,
salt: [u8; 16],
}
Expand description
Raw argon2 settings differ from the crate::keys::Kdf::Argon2id struct defined for existing master-password unlock. The memory is represented in kibibytes (KiB) instead of mebibytes (MiB), and the salt is a fixed size of 32 bytes, and randomly generated, instead of being derived from the email.
Fields§
§iterations: u32
§memory: u32
Memory in KiB
parallelism: u32
§salt: [u8; 16]
Implementations§
Source§impl Argon2RawSettings
impl Argon2RawSettings
Sourcefn local_kdf_settings() -> Self
fn local_kdf_settings() -> Self
Creates default Argon2 settings based on the device. This currently is a static preset based on the target os
Trait Implementations§
Source§impl From<&Argon2RawSettings> for Header
impl From<&Argon2RawSettings> for Header
Source§fn from(settings: &Argon2RawSettings) -> Header
fn from(settings: &Argon2RawSettings) -> Header
Converts to this type from the input type.
Source§impl TryInto<Argon2RawSettings> for &Header
impl TryInto<Argon2RawSettings> for &Header
Source§type Error = PasswordProtectedKeyEnvelopeError
type Error = PasswordProtectedKeyEnvelopeError
The type returned in the event of a conversion error.
Source§fn try_into(
self,
) -> Result<Argon2RawSettings, PasswordProtectedKeyEnvelopeError>
fn try_into( self, ) -> Result<Argon2RawSettings, PasswordProtectedKeyEnvelopeError>
Performs the conversion.
Source§impl TryInto<Params> for &Argon2RawSettings
impl TryInto<Params> for &Argon2RawSettings
Source§type Error = PasswordProtectedKeyEnvelopeError
type Error = PasswordProtectedKeyEnvelopeError
The type returned in the event of a conversion error.
Source§fn try_into(self) -> Result<Params, PasswordProtectedKeyEnvelopeError>
fn try_into(self) -> Result<Params, PasswordProtectedKeyEnvelopeError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Argon2RawSettings
impl RefUnwindSafe for Argon2RawSettings
impl Send for Argon2RawSettings
impl Sync for Argon2RawSettings
impl Unpin for Argon2RawSettings
impl UnwindSafe for Argon2RawSettings
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read moreSource§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more