[][src]Struct ed25519_zebra::PublicKeyBytes

pub struct PublicKeyBytes(_);

A refinement type for [u8; 32] indicating that the bytes represent an encoding of an Ed25519 public key.

This is useful for representing an encoded public key, while the PublicKey type in this library caches other decoded state used in signature verification.

A PublicKeyBytes can be used to verify a single signature using the following idiom:

use std::convert::TryFrom;
PublicKey::try_from(pk_bytes)
    .and_then(|pk| pk.verify(&sig, msg));

Trait Implementations

impl Clone for PublicKeyBytes[src]

impl Copy for PublicKeyBytes[src]

impl Debug for PublicKeyBytes[src]

impl<'de> Deserialize<'de> for PublicKeyBytes[src]

impl Eq for PublicKeyBytes[src]

impl<'a> From<&'a SecretKey> for PublicKeyBytes[src]

impl From<[u8; 32]> for PublicKeyBytes[src]

impl From<PublicKey> for PublicKeyBytes[src]

impl From<PublicKeyBytes> for [u8; 32][src]

impl Hash for PublicKeyBytes[src]

impl PartialEq<PublicKeyBytes> for PublicKeyBytes[src]

impl Serialize for PublicKeyBytes[src]

impl StructuralEq for PublicKeyBytes[src]

impl StructuralPartialEq for PublicKeyBytes[src]

impl TryFrom<PublicKeyBytes> for PublicKey[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,