Struct ecies_ed25519::PublicKey[][src]

pub struct PublicKey(_);

Public Key

Neither this public key (nor it’s corresponding PrivateKey) should be used for signing or in any other protocol other than ECIES.

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.

pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>[src]

Construct a PublicKey from a slice of bytes.

Will return None if the bytes are invalid

pub fn from_secret(sk: &SecretKey) -> Self[src]

Derive a public key from a private key

pub fn to_point(&self) -> EdwardsPoint[src]

Get the Edwards Point for this public key

Trait Implementations

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

impl Clone for PublicKey[src]

impl Copy for PublicKey[src]

impl Debug for PublicKey[src]

impl Default for PublicKey[src]

impl Eq for PublicKey[src]

impl FromHex for PublicKey[src]

type Error = Error

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> ToHex for T where
    T: AsRef<[u8]>, 
[src]

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