pub struct Ed25519Signature { /* private fields */ }
Expand description
An ed25519 cryptographic signature
Implementations§
Source§impl Ed25519Signature
A wrapper around tor_llcrypto::pk::ed25519::Signature
impl Ed25519Signature
A wrapper around tor_llcrypto::pk::ed25519::Signature
Sourcepub fn from_raw(raw: &[u8; 64]) -> Result<Ed25519Signature, Error>
pub fn from_raw(raw: &[u8; 64]) -> Result<Ed25519Signature, Error>
Construct an Ed25519Signature
from an array of bytes.
Sourcepub fn verify(&self, message: &[u8], public_key: &Ed25519PublicKey) -> bool
pub fn verify(&self, message: &[u8], public_key: &Ed25519PublicKey) -> bool
Verify this Ed25519Signature
for the given message and Ed25519PublicKey
.
Sourcepub fn verify_x25519(
&self,
message: &[u8],
public_key: &X25519PublicKey,
signbit: SignBit,
) -> bool
pub fn verify_x25519( &self, message: &[u8], public_key: &X25519PublicKey, signbit: SignBit, ) -> bool
Verify this Ed25519Signature
for the given message, X25519PublicKey
, and SignBit
. This signature must have been created by first converting an X25519PrivateKey
to a Ed25519PrivateKey
and SignBit
, and then signing the message using this Ed25519PrivateKey
. This method verifies the signature using the Ed25519PublicKey
derived from the provided X25519PublicKey
and SignBit
.
Trait Implementations§
Source§impl Clone for Ed25519Signature
impl Clone for Ed25519Signature
Source§fn clone(&self) -> Ed25519Signature
fn clone(&self) -> Ed25519Signature
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 Ed25519Signature
impl Debug for Ed25519Signature
Source§impl PartialEq for Ed25519Signature
impl PartialEq for Ed25519Signature
Auto Trait Implementations§
impl Freeze for Ed25519Signature
impl RefUnwindSafe for Ed25519Signature
impl Send for Ed25519Signature
impl Sync for Ed25519Signature
impl Unpin for Ed25519Signature
impl UnwindSafe for Ed25519Signature
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.