[][src]Struct signatory_ring::ed25519::PublicKey

pub struct PublicKey(pub [u8; 32]);

Ed25519 public keys

Methods

impl PublicKey[src]

pub fn new(bytes: [u8; 32]) -> PublicKey[src]

Create an Ed25519 public key from a 32-byte array

pub fn from_bytes<B>(bytes: B) -> Option<PublicKey> where
    B: AsRef<[u8]>, 
[src]

Create an Ed25519 public key from its serialized (compressed Edwards-y) form

pub fn as_bytes(&self) -> &[u8; 32][src]

Obtain public key as a byte array reference

pub fn into_bytes(self) -> [u8; 32][src]

Convert public key into owned byte array

Trait Implementations

impl Ord for PublicKey[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Clone for PublicKey[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PublicKey for PublicKey[src]

impl Encode for PublicKey[src]

fn encode<E>(&self, encoding: &E) -> Vec<u8> where
    E: Encoding
[src]

Encode an Ed25519 seed with the given encoding (e.g. hex, Base64)

fn encode_to_string<E>(&self, encoding: &E) -> Result<String, Error> where
    E: Encoding
[src]

Encode self to a String using the provided Encoding, returning the encoded value or a Error. Read more

fn encode_to_writer<W, E>(
    &self,
    writer: &mut W,
    encoding: &E
) -> Result<usize, Error> where
    E: Encoding,
    W: Write
[src]

Encode self with the given Encoding, writing the result to the supplied io::Write type, returning the number of bytes written or a Error. Read more

fn encode_to_file<P, E>(&self, path: P, encoding: &E) -> Result<File, Error> where
    E: Encoding,
    P: AsRef<Path>, 
[src]

Encode self and write it to a file at the given path, returning the resulting File or a Error. Read more

impl Copy for PublicKey[src]

impl Eq for PublicKey[src]

impl Debug for PublicKey[src]

impl Hash for PublicKey[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq<PublicKey> for PublicKey[src]

impl PartialOrd<PublicKey> for PublicKey[src]

impl Decode for PublicKey[src]

fn decode<E>(encoded_key: &[u8], encoding: &E) -> Result<PublicKey, Error> where
    E: Encoding
[src]

Decode an Ed25519 seed from a byte slice with the given encoding (e.g. hex, Base64)

fn decode_from_str<S, E>(encoded_str: S, encoding: &E) -> Result<Self, Error> where
    E: Encoding,
    S: AsRef<str>, 
[src]

Decode the given string-alike type with the provided Encoding, returning the decoded value or a Error. Read more

fn decode_from_reader<R, E>(reader: &mut R, encoding: &E) -> Result<Self, Error> where
    E: Encoding,
    R: Read
[src]

Decode the data read from the given io::Read type with the provided Encoding, returning the decoded value or a Error. Read more

fn decode_from_file<P, E>(path: P, encoding: &E) -> Result<Self, Error> where
    E: Encoding,
    P: AsRef<Path>, 
[src]

Read a file at the given path, decoding the data it contains using the provided Encoding, returning the decoded value or a Error. Read more

impl AsRef<[u8]> for PublicKey[src]

impl<'a> From<&'a PublicKey> for Verifier[src]

impl PublicKeyed<PublicKey> for Signer[src]

Auto Trait Implementations

impl Send for PublicKey

impl Sync for PublicKey

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> Same<T> for T

type Output = T

Should always be Self