pub struct Fingerprint(/* private fields */);Expand description
A peer’s identity fingerprint: the first 16 bytes of SHA-256(signing_public_key).
Derived from the signing key, never the agreement key, so the key whose signature is verified on every handshake is provably the same key a safety number displays.
Implementations§
Source§impl Fingerprint
impl Fingerprint
Sourcepub fn of_signing_key(signing_public: &[u8; 32]) -> Self
pub fn of_signing_key(signing_public: &[u8; 32]) -> Self
Derive a fingerprint from a raw Ed25519 signing public key.
Sourcepub fn safety_number(&self) -> String
pub fn safety_number(&self) -> String
Render as 8 groups of 4 uppercase hex characters separated by spaces: the safety number two people compare out of band to confirm they share the same peer.
Trait Implementations§
Source§impl Clone for Fingerprint
impl Clone for Fingerprint
Source§fn clone(&self) -> Fingerprint
fn clone(&self) -> Fingerprint
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 moreimpl Copy for Fingerprint
Source§impl Debug for Fingerprint
impl Debug for Fingerprint
Source§impl<'de> Deserialize<'de> for Fingerprint
impl<'de> Deserialize<'de> for Fingerprint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Fingerprint
Source§impl Hash for Fingerprint
impl Hash for Fingerprint
Source§impl Ord for Fingerprint
impl Ord for Fingerprint
Source§fn cmp(&self, other: &Fingerprint) -> Ordering
fn cmp(&self, other: &Fingerprint) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Fingerprint
impl PartialEq for Fingerprint
Source§fn eq(&self, other: &Fingerprint) -> bool
fn eq(&self, other: &Fingerprint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Fingerprint
impl PartialOrd for Fingerprint
Source§impl Serialize for Fingerprint
impl Serialize for Fingerprint
impl StructuralPartialEq for Fingerprint
Auto Trait Implementations§
impl Freeze for Fingerprint
impl RefUnwindSafe for Fingerprint
impl Send for Fingerprint
impl Sync for Fingerprint
impl Unpin for Fingerprint
impl UnsafeUnpin for Fingerprint
impl UnwindSafe for Fingerprint
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