pub struct TorEd25519SigningKey { /* private fields */ }Expand description
Tor Ed25519 Signing (private) key
Implementations§
Source§impl TorEd25519SigningKey
impl TorEd25519SigningKey
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Retrieve the public verifying key from the secret key
Sourcepub fn from_blob(blob: &str) -> Result<Self, TorError>
pub fn from_blob(blob: &str) -> Result<Self, TorError>
Create the signing key from the key blob returned by the ADD_ONION call
(see https://github.com/torproject/torspec/blob/main/control-spec.txt#L1862-L1864)
Sourcepub fn from_bytes(bytes: [u8; 64]) -> Self
pub fn from_bytes(bytes: [u8; 64]) -> Self
Convert from raw bytes to the SigningKey
Trait Implementations§
Source§impl Display for TorEd25519SigningKey
impl Display for TorEd25519SigningKey
Source§impl Drop for TorEd25519SigningKey
impl Drop for TorEd25519SigningKey
Source§impl From<OnionService> for TorEd25519SigningKey
Convert an onion service to a signing key
impl From<OnionService> for TorEd25519SigningKey
Convert an onion service to a signing key
Source§fn from(onion_service: OnionService) -> Self
fn from(onion_service: OnionService) -> Self
Converts to this type from the input type.
Source§impl From<SigningKey> for TorEd25519SigningKey
Convert from an ED25519 signing key to our signing key.
This takes the 32-byte secret key and hashes, clamps, and reduces it
to the 64-byte expanded key.
impl From<SigningKey> for TorEd25519SigningKey
Convert from an ED25519 signing key to our signing key. This takes the 32-byte secret key and hashes, clamps, and reduces it to the 64-byte expanded key.
Source§fn from(signing_key: SigningKey) -> Self
fn from(signing_key: SigningKey) -> Self
Converts to this type from the input type.
Source§impl FromStr for TorEd25519SigningKey
Convert from a Base64-encoded Tor blob to our signing key
impl FromStr for TorEd25519SigningKey
Convert from a Base64-encoded Tor blob to our signing key
Source§impl Signer<Signature> for TorEd25519SigningKey
Implement signing for the Tor key
impl Signer<Signature> for TorEd25519SigningKey
Implement signing for the Tor key
Auto Trait Implementations§
impl Freeze for TorEd25519SigningKey
impl RefUnwindSafe for TorEd25519SigningKey
impl Send for TorEd25519SigningKey
impl Sync for TorEd25519SigningKey
impl Unpin for TorEd25519SigningKey
impl UnwindSafe for TorEd25519SigningKey
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> 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 more