pub struct DevicePublicKey(/* private fields */);Expand description
One device’s key for acting as a portable user: its own Ed25519 keypair, apart from both the user’s root and the device’s Iroh endpoint key. Written, and serialized, as 64 lowercase hex digits.
Implementations§
Source§impl DevicePublicKey
impl DevicePublicKey
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Result<Self, InvalidDevicePublicKey>
pub fn from_bytes(bytes: [u8; 32]) -> Result<Self, InvalidDevicePublicKey>
The key bytes are; an error if they are not a point on the curve.
pub fn as_bytes(&self) -> &[u8; 32]
Sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
The short code a person compares between the device and the phone
that authorizes it, in the same format as an identity’s
(PortableUserId::fingerprint).
Trait Implementations§
Source§impl Clone for DevicePublicKey
impl Clone for DevicePublicKey
impl Copy for DevicePublicKey
Source§impl Debug for DevicePublicKey
impl Debug for DevicePublicKey
Source§impl<'de> Deserialize<'de> for DevicePublicKey
impl<'de> Deserialize<'de> for DevicePublicKey
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for DevicePublicKey
impl Display for DevicePublicKey
impl Eq for DevicePublicKey
Source§impl FromStr for DevicePublicKey
impl FromStr for DevicePublicKey
Source§impl Hash for DevicePublicKey
impl Hash for DevicePublicKey
Source§impl Ord for DevicePublicKey
impl Ord for DevicePublicKey
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for DevicePublicKey
impl PartialEq for DevicePublicKey
Source§impl PartialOrd for DevicePublicKey
impl PartialOrd for DevicePublicKey
Source§impl Serialize for DevicePublicKey
impl Serialize for DevicePublicKey
impl StructuralPartialEq for DevicePublicKey
Auto Trait Implementations§
impl Forget for DevicePublicKey
impl Freeze for DevicePublicKey
impl Move for DevicePublicKey
impl RefUnwindSafe for DevicePublicKey
impl Send for DevicePublicKey
impl Sync for DevicePublicKey
impl Unpin for DevicePublicKey
impl UnsafeUnpin for DevicePublicKey
impl UnwindSafe for DevicePublicKey
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