pub struct VerifyingKey {
pub(super) id: KeyId,
pub(super) inner: RawVerifyingKey,
}
Expand description
A verifying key is a public key used for verifying signatures. It can be published to other
users, who can use it to verify that messages were signed by the holder of the corresponding
SigningKey
.
Fields§
§id: KeyId
§inner: RawVerifyingKey
Implementations§
Source§impl VerifyingKey
impl VerifyingKey
Sourcepub fn algorithm(&self) -> SignatureAlgorithm
pub fn algorithm(&self) -> SignatureAlgorithm
Returns the signature scheme used by the verifying key.
Sourcepub(super) fn verify_raw(
&self,
signature: &[u8],
data: &[u8],
) -> Result<(), CryptoError>
pub(super) fn verify_raw( &self, signature: &[u8], data: &[u8], ) -> Result<(), CryptoError>
Verifies the signature of the given data, for the given namespace.
This should never be used directly, but only through the verify
method, to enforce
strong domain separation of the signatures.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VerifyingKey
impl RefUnwindSafe for VerifyingKey
impl Send for VerifyingKey
impl Sync for VerifyingKey
impl Unpin for VerifyingKey
impl UnwindSafe for VerifyingKey
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read moreSource§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