Struct ed25519_zebra::VerificationKeyBytes
source · [−]pub struct VerificationKeyBytes(_);
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
sourceimpl AsRef<[u8]> for VerificationKeyBytes
impl AsRef<[u8]> for VerificationKeyBytes
sourceimpl Clone for VerificationKeyBytes
impl Clone for VerificationKeyBytes
sourcefn clone(&self) -> VerificationKeyBytes
fn clone(&self) -> VerificationKeyBytes
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for VerificationKeyBytes
impl Debug for VerificationKeyBytes
sourceimpl<'de> Deserialize<'de> for VerificationKeyBytes
impl<'de> Deserialize<'de> for VerificationKeyBytes
sourcefn 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
sourceimpl<'a> From<&'a SigningKey> for VerificationKeyBytes
impl<'a> From<&'a SigningKey> for VerificationKeyBytes
sourcefn from(sk: &'a SigningKey) -> VerificationKeyBytes
fn from(sk: &'a SigningKey) -> VerificationKeyBytes
Converts to this type from the input type.
sourceimpl From<[u8; 32]> for VerificationKeyBytes
impl From<[u8; 32]> for VerificationKeyBytes
sourcefn from(bytes: [u8; 32]) -> VerificationKeyBytes
fn from(bytes: [u8; 32]) -> VerificationKeyBytes
Converts to this type from the input type.
sourceimpl From<VerificationKey> for VerificationKeyBytes
impl From<VerificationKey> for VerificationKeyBytes
sourcefn from(vk: VerificationKey) -> VerificationKeyBytes
fn from(vk: VerificationKey) -> VerificationKeyBytes
Converts to this type from the input type.
sourceimpl From<VerificationKeyBytes> for [u8; 32]
impl From<VerificationKeyBytes> for [u8; 32]
sourcefn from(refined: VerificationKeyBytes) -> [u8; 32]
fn from(refined: VerificationKeyBytes) -> [u8; 32]
Converts to this type from the input type.
sourceimpl Hash for VerificationKeyBytes
impl Hash for VerificationKeyBytes
sourceimpl Ord for VerificationKeyBytes
impl Ord for VerificationKeyBytes
sourcefn cmp(&self, other: &VerificationKeyBytes) -> Ordering
fn cmp(&self, other: &VerificationKeyBytes) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<VerificationKeyBytes> for VerificationKeyBytes
impl PartialEq<VerificationKeyBytes> for VerificationKeyBytes
sourcefn eq(&self, other: &VerificationKeyBytes) -> bool
fn eq(&self, other: &VerificationKeyBytes) -> bool
sourceimpl PartialOrd<VerificationKeyBytes> for VerificationKeyBytes
impl PartialOrd<VerificationKeyBytes> for VerificationKeyBytes
sourcefn partial_cmp(&self, other: &VerificationKeyBytes) -> Option<Ordering>
fn partial_cmp(&self, other: &VerificationKeyBytes) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl Serialize for VerificationKeyBytes
impl Serialize for VerificationKeyBytes
sourceimpl TryFrom<&[u8]> for VerificationKeyBytes
impl TryFrom<&[u8]> for VerificationKeyBytes
sourceimpl TryFrom<VerificationKeyBytes> for VerificationKey
impl TryFrom<VerificationKeyBytes> for VerificationKey
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere
T: AsRef<[u8]>,
sourcefn 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
) Read moresourcefn 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
) Read more