pub struct X25519PublicKey { /* private fields */ }
Expand description
An x25519 public key
Implementations§
Source§impl X25519PublicKey
A wrapper around tor_llcrypto::pk::curve25519::PublicKey
impl X25519PublicKey
A wrapper around tor_llcrypto::pk::curve25519::PublicKey
Sourcepub fn from_private_key(private_key: &X25519PrivateKey) -> X25519PublicKey
pub fn from_private_key(private_key: &X25519PrivateKey) -> X25519PublicKey
Construct an X25519PublicKey
from an X25519PrivateKey
.
Sourcepub fn from_raw(raw: &[u8; 32]) -> X25519PublicKey
pub fn from_raw(raw: &[u8; 32]) -> X25519PublicKey
Construct an X25519PublicKey
from an array of bytes.
Sourcepub fn from_base32(base32: &str) -> Result<X25519PublicKey, Error>
pub fn from_base32(base32: &str) -> Result<X25519PublicKey, Error>
Create an X25519PublicKey
from a String
in the legacy c-tor daemon key base32 format used in the ADD_ONION
control-port command. From the c-tor control specification:
V3Key = The client's base32-encoded x25519 public key, using only the key part of rend-spec-v3.txt section G.1.2 (v3 only).
Only key base32 strings derived from X25519PublicKey::to_base32()
are required to convert correctly.
Trait Implementations§
Source§impl Clone for X25519PublicKey
impl Clone for X25519PublicKey
Source§fn clone(&self) -> X25519PublicKey
fn clone(&self) -> X25519PublicKey
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 X25519PublicKey
impl Debug for X25519PublicKey
Source§impl Hash for X25519PublicKey
impl Hash for X25519PublicKey
Source§impl PartialEq for X25519PublicKey
impl PartialEq for X25519PublicKey
impl Eq for X25519PublicKey
impl StructuralPartialEq for X25519PublicKey
Auto Trait Implementations§
impl Freeze for X25519PublicKey
impl RefUnwindSafe for X25519PublicKey
impl Send for X25519PublicKey
impl Sync for X25519PublicKey
impl Unpin for X25519PublicKey
impl UnwindSafe for X25519PublicKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
Source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
Source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.