pub struct MachinePrivateKey(/* private fields */);Expand description
The X25519 private key of a unique piece of hardware running one or more Tailscale nodes.
Implementations§
Source§impl MachinePrivateKey
impl MachinePrivateKey
Sourcepub const KEY_LEN_BYTES: usize = 32
pub const KEY_LEN_BYTES: usize = 32
The length of this key type, in bytes.
Sourcepub const KEY_LEN_HEX_STR: usize
pub const KEY_LEN_HEX_STR: usize
The length of a hexidecimal string representation of this key, excluding the prefix and colon.
Sourcepub const KEY_LEN_FULL_STR: usize
pub const KEY_LEN_FULL_STR: usize
The length of a hexidecimal string representation of this key, including the prefix and colon.
Sourcepub const KEY_PREFIX: &'static str = "privkey"
pub const KEY_PREFIX: &'static str = "privkey"
The prefix placed in front of string representations of this key type, such as “$key_prefix:abcd…”
Source§impl MachinePrivateKey
impl MachinePrivateKey
Sourcepub fn public_key(&self) -> MachinePublicKey
pub fn public_key(&self) -> MachinePublicKey
Calculate the corresponding public key for this private key.
Takes &self (not self): deriving the public key must not consume — and thus
drop/zeroize — the private key now that it is not Copy. Mirrors Go’s
key.NodePrivate.Public() pointer receiver.
Trait Implementations§
Source§impl Clone for MachinePrivateKey
impl Clone for MachinePrivateKey
Source§fn clone(&self) -> MachinePrivateKey
fn clone(&self) -> MachinePrivateKey
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 MachinePrivateKey
impl Debug for MachinePrivateKey
Source§impl Display for MachinePrivateKey
impl Display for MachinePrivateKey
Source§impl Drop for MachinePrivateKey
impl Drop for MachinePrivateKey
impl Eq for MachinePrivateKey
Source§impl From<&MachinePrivateKey> for StaticSecret
impl From<&MachinePrivateKey> for StaticSecret
Source§fn from(v: &MachinePrivateKey) -> Self
fn from(v: &MachinePrivateKey) -> Self
Converts to this type from the input type.
Source§impl From<&MachinePrivateKey> for SecretKey
impl From<&MachinePrivateKey> for SecretKey
Source§fn from(v: &MachinePrivateKey) -> Self
fn from(v: &MachinePrivateKey) -> Self
Converts to this type from the input type.
Source§impl From<&MachinePrivateKey> for MachinePublicKey
impl From<&MachinePrivateKey> for MachinePublicKey
Source§fn from(v: &MachinePrivateKey) -> Self
fn from(v: &MachinePrivateKey) -> Self
Converts to this type from the input type.
Source§impl From<MachinePrivateKey> for StaticSecret
impl From<MachinePrivateKey> for StaticSecret
Source§fn from(v: MachinePrivateKey) -> Self
fn from(v: MachinePrivateKey) -> Self
Converts to this type from the input type.
Source§impl From<MachinePrivateKey> for SecretKey
impl From<MachinePrivateKey> for SecretKey
Source§fn from(v: MachinePrivateKey) -> Self
fn from(v: MachinePrivateKey) -> Self
Converts to this type from the input type.
Source§impl From<MachinePrivateKey> for MachinePublicKey
impl From<MachinePrivateKey> for MachinePublicKey
Source§fn from(v: MachinePrivateKey) -> Self
fn from(v: MachinePrivateKey) -> Self
Converts to this type from the input type.
Source§impl From<MachinePrivateKey> for MachineKeyPair
impl From<MachinePrivateKey> for MachineKeyPair
Source§fn from(private: MachinePrivateKey) -> Self
fn from(private: MachinePrivateKey) -> Self
Converts to this type from the input type.
Source§impl FromStr for MachinePrivateKey
impl FromStr for MachinePrivateKey
Source§impl PartialEq for MachinePrivateKey
impl PartialEq for MachinePrivateKey
Source§fn eq(&self, other: &MachinePrivateKey) -> bool
fn eq(&self, other: &MachinePrivateKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MachinePrivateKey
Auto Trait Implementations§
impl Freeze for MachinePrivateKey
impl RefUnwindSafe for MachinePrivateKey
impl Send for MachinePrivateKey
impl Sync for MachinePrivateKey
impl Unpin for MachinePrivateKey
impl UnsafeUnpin for MachinePrivateKey
impl UnwindSafe for MachinePrivateKey
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