pub struct CredentialIdLength(/* private fields */);
Expand description
The length of credentialId that should be randomly generated during a credential creation operation.
The value has a maximum of 64
per the webauthn specification. The minimum is a library enforced as 16
.
It is recommended to randomize this if possible to avoid authenticator fingerprinting.
Implementations§
Source§impl CredentialIdLength
impl CredentialIdLength
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
The default length of a credentialId to generate.
This value is the same as Self::default
, but available in
const
contexts.
Sourcepub fn randomized(rng: &mut impl Rng) -> Self
pub fn randomized(rng: &mut impl Rng) -> Self
Generates and returns a uniformly random CredentialIdLength.
Trait Implementations§
Source§impl Clone for CredentialIdLength
impl Clone for CredentialIdLength
Source§fn clone(&self) -> CredentialIdLength
fn clone(&self) -> CredentialIdLength
Returns a duplicate of the value. Read more
1.0.0 · 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 CredentialIdLength
impl Debug for CredentialIdLength
Source§impl Default for CredentialIdLength
impl Default for CredentialIdLength
Source§impl From<CredentialIdLength> for usize
impl From<CredentialIdLength> for usize
Source§fn from(value: CredentialIdLength) -> Self
fn from(value: CredentialIdLength) -> Self
Converts to this type from the input type.
Source§impl From<u8> for CredentialIdLength
impl From<u8> for CredentialIdLength
impl Copy for CredentialIdLength
Auto Trait Implementations§
impl Freeze for CredentialIdLength
impl RefUnwindSafe for CredentialIdLength
impl Send for CredentialIdLength
impl Sync for CredentialIdLength
impl Unpin for CredentialIdLength
impl UnwindSafe for CredentialIdLength
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