Struct tor_interface::tor_crypto::X25519PrivateKey
source · pub struct X25519PrivateKey { /* private fields */ }
Implementations§
source§impl X25519PrivateKey
impl X25519PrivateKey
pub fn generate() -> X25519PrivateKey
pub fn from_raw(raw: &[u8; 32]) -> Result<X25519PrivateKey, Error>
pub fn from_base64(base64: &str) -> Result<X25519PrivateKey, Error>
pub fn sign_message( &self, message: &[u8], ) -> Result<(Ed25519Signature, SignBit), Error>
pub fn to_base64(&self) -> String
pub fn to_bytes(&self) -> [u8; 32]
Trait Implementations§
source§impl Clone for X25519PrivateKey
impl Clone for X25519PrivateKey
source§fn clone(&self) -> X25519PrivateKey
fn clone(&self) -> X25519PrivateKey
Returns a copy 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 X25519PrivateKey
impl Debug for X25519PrivateKey
Auto Trait Implementations§
impl Freeze for X25519PrivateKey
impl RefUnwindSafe for X25519PrivateKey
impl Send for X25519PrivateKey
impl Sync for X25519PrivateKey
impl Unpin for X25519PrivateKey
impl UnwindSafe for X25519PrivateKey
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.