pub struct AuthChallenge(/* private fields */);Expand description
A 32-byte random authentication challenge.
Implementations§
Source§impl AuthChallenge
impl AuthChallenge
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Create a challenge from bytes.
Sourcepub fn verify(&self, response: &AuthResponse) -> Result<NodeAddr, IdentityError>
pub fn verify(&self, response: &AuthResponse) -> Result<NodeAddr, IdentityError>
Verify a response to this challenge.
Trait Implementations§
Source§impl Clone for AuthChallenge
impl Clone for AuthChallenge
Source§fn clone(&self) -> AuthChallenge
fn clone(&self) -> AuthChallenge
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 AuthChallenge
impl Debug for AuthChallenge
impl Copy for AuthChallenge
Auto Trait Implementations§
impl Freeze for AuthChallenge
impl RefUnwindSafe for AuthChallenge
impl Send for AuthChallenge
impl Sync for AuthChallenge
impl Unpin for AuthChallenge
impl UnsafeUnpin for AuthChallenge
impl UnwindSafe for AuthChallenge
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