Struct ed25519_zebra::VerificationKeyBytes
source · pub struct VerificationKeyBytes(/* private fields */);
Expand description
A refinement type for [u8; 32]
indicating that the bytes represent an
encoding of an Ed25519 verification key.
This is useful for representing an encoded verification key, while the
VerificationKey
type in this library caches other decoded state used in
signature verification.
A VerificationKeyBytes
can be used to verify a single signature using the
following idiom:
use core::convert::TryFrom;
VerificationKey::try_from(vk_bytes)
.and_then(|vk| vk.verify(&sig, msg));
Trait Implementations§
source§impl AsRef<[u8]> for VerificationKeyBytes
impl AsRef<[u8]> for VerificationKeyBytes
source§impl Clone for VerificationKeyBytes
impl Clone for VerificationKeyBytes
source§fn clone(&self) -> VerificationKeyBytes
fn clone(&self) -> VerificationKeyBytes
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 VerificationKeyBytes
impl Debug for VerificationKeyBytes
source§impl<'de> Deserialize<'de> for VerificationKeyBytes
impl<'de> Deserialize<'de> for VerificationKeyBytes
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<&'a SigningKey> for VerificationKeyBytes
impl<'a> From<&'a SigningKey> for VerificationKeyBytes
source§fn from(sk: &'a SigningKey) -> VerificationKeyBytes
fn from(sk: &'a SigningKey) -> VerificationKeyBytes
Converts to this type from the input type.
source§impl From<VerificationKey> for VerificationKeyBytes
impl From<VerificationKey> for VerificationKeyBytes
source§fn from(vk: VerificationKey) -> VerificationKeyBytes
fn from(vk: VerificationKey) -> VerificationKeyBytes
Converts to this type from the input type.
source§impl Hash for VerificationKeyBytes
impl Hash for VerificationKeyBytes
source§impl Ord for VerificationKeyBytes
impl Ord for VerificationKeyBytes
source§fn cmp(&self, other: &VerificationKeyBytes) -> Ordering
fn cmp(&self, other: &VerificationKeyBytes) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<VerificationKeyBytes> for VerificationKeyBytes
impl PartialEq<VerificationKeyBytes> for VerificationKeyBytes
source§fn eq(&self, other: &VerificationKeyBytes) -> bool
fn eq(&self, other: &VerificationKeyBytes) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<VerificationKeyBytes> for VerificationKeyBytes
impl PartialOrd<VerificationKeyBytes> for VerificationKeyBytes
source§fn partial_cmp(&self, other: &VerificationKeyBytes) -> Option<Ordering>
fn partial_cmp(&self, other: &VerificationKeyBytes) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for VerificationKeyBytes
impl Serialize for VerificationKeyBytes
source§impl TryFrom<&[u8]> for VerificationKeyBytes
impl TryFrom<&[u8]> for VerificationKeyBytes
impl Copy for VerificationKeyBytes
impl Eq for VerificationKeyBytes
impl StructuralEq for VerificationKeyBytes
impl StructuralPartialEq for VerificationKeyBytes
Auto Trait Implementations§
impl RefUnwindSafe for VerificationKeyBytes
impl Send for VerificationKeyBytes
impl Sync for VerificationKeyBytes
impl Unpin for VerificationKeyBytes
impl UnwindSafe for VerificationKeyBytes
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> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)