Struct ed25519_consensus::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));
Implementations
Trait Implementations
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 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl 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<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 Hash for VerificationKeyBytes
impl Hash for VerificationKeyBytes
sourceimpl Ord for VerificationKeyBytes
impl Ord for VerificationKeyBytes
sourceimpl PartialEq<VerificationKeyBytes> for VerificationKeyBytes
impl PartialEq<VerificationKeyBytes> for VerificationKeyBytes
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &VerificationKeyBytes) -> bool
fn ne(&self, other: &VerificationKeyBytes) -> bool
This method tests for !=
.
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl Serialize for VerificationKeyBytes
impl Serialize 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
sourcefn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more