pub struct DeclarePaperCodeParams {
pub argon2id_hash: Vec<u8>,
pub salt: Vec<u8>,
pub params: Option<Argon2idParams>,
}Expand description
Declare a paper-code (mnemonic) recovery method (kind=paper_code). The
plaintext mnemonic is generated client-side and NEVER transmitted — only
the argon2id verifier, its salt, and the KDF params are sent. The server
MUST reject any request that carries plaintext mnemonic bytes. weft#186.
Fields§
§argon2id_hash: Vec<u8>argon2id(mnemonic, salt, params). Raw hash bytes.
salt: Vec<u8>Per-row random salt the client used. Stored so SubmitRecoveryProof can tell the recovering client which salt to hash against.
params: Option<Argon2idParams>KDF params stored alongside the hash so they can be tuned without breaking existing codes. Floor per OWASP: 64 MiB memory, 3 iterations, parallelism 4.
Trait Implementations§
Source§impl Clone for DeclarePaperCodeParams
impl Clone for DeclarePaperCodeParams
Source§fn clone(&self) -> DeclarePaperCodeParams
fn clone(&self) -> DeclarePaperCodeParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeclarePaperCodeParams
impl Debug for DeclarePaperCodeParams
Source§impl Default for DeclarePaperCodeParams
impl Default for DeclarePaperCodeParams
impl Eq for DeclarePaperCodeParams
Source§impl Hash for DeclarePaperCodeParams
impl Hash for DeclarePaperCodeParams
Source§impl Message for DeclarePaperCodeParams
impl Message for DeclarePaperCodeParams
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for DeclarePaperCodeParams
impl PartialEq for DeclarePaperCodeParams
impl StructuralPartialEq for DeclarePaperCodeParams
Auto Trait Implementations§
impl Freeze for DeclarePaperCodeParams
impl RefUnwindSafe for DeclarePaperCodeParams
impl Send for DeclarePaperCodeParams
impl Sync for DeclarePaperCodeParams
impl Unpin for DeclarePaperCodeParams
impl UnsafeUnpin for DeclarePaperCodeParams
impl UnwindSafe for DeclarePaperCodeParams
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