Struct x25519_dalek::PublicKey[][src]

pub struct PublicKey(_);
Expand description

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

We implement Zeroize so that downstream consumers may derive it for Drop should they wish to erase public keys from memory. Note that this erasure (in this crate) does not automatically happen, but either must be derived for Drop or explicitly called.

Implementations

Convert this public key to a byte array.

View this public key as a byte array.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Given an x25519 EphemeralSecret key, compute its corresponding PublicKey.

Given an x25519 ReusableSecret key, compute its corresponding PublicKey.

Given an x25519 StaticSecret key, compute its corresponding PublicKey.

Given a byte array, construct a x25519 PublicKey.

Feeds this value into the given Hasher. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.