Struct x25519_dalek::PublicKey[][src]

pub struct PublicKey(_);

A Diffie-Hellman public key, corresponding to an EphemeralSecret or StaticSecret key.

Implementations

impl PublicKey[src]

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

Convert this public key to a byte array.

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

View this public key as a byte array.

Trait Implementations

impl Clone for PublicKey[src]

impl Copy for PublicKey[src]

impl Debug for PublicKey[src]

impl Eq for PublicKey[src]

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

fn from(secret: &'a EphemeralSecret) -> PublicKey[src]

Given an x25519 EphemeralSecret key, compute its corresponding PublicKey.

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

fn from(secret: &'a StaticSecret) -> PublicKey[src]

Given an x25519 StaticSecret key, compute its corresponding PublicKey.

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

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

Given a byte array, construct a x25519 PublicKey.

impl Hash for PublicKey[src]

impl PartialEq<PublicKey> for PublicKey[src]

impl StructuralEq for PublicKey[src]

impl StructuralPartialEq for PublicKey[src]

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> 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.