Struct libp2p_noise::X25519[][src]

pub struct X25519(_);
Expand description

A X25519 key.

Trait Implementations

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

fn as_ref(&self) -> &[u8][src]

Performs the conversion.

impl Clone for X25519[src]

fn clone(&self) -> X25519[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Protocol<X25519> for X25519[src]

Legacy Noise protocol for X25519.

Note: This Protocol provides no configuration that is interoperable with other libp2p implementations. See crate::X25519Spec instead.

fn params_ik() -> ProtocolParams[src]

The protocol parameters for the IK handshake pattern.

fn params_ix() -> ProtocolParams[src]

The protocol parameters for the IX handshake pattern.

fn params_xx() -> ProtocolParams[src]

The protocol parameters for the XX handshake pattern.

fn public_from_bytes(bytes: &[u8]) -> Result<PublicKey<X25519>, NoiseError>[src]

Construct a DH public key from a byte slice.

fn linked(id_pk: &PublicKey, dh_pk: &PublicKey<X25519>) -> bool[src]

👎 Deprecated

Determines whether the authenticity of the given DH static public key and public identity key is linked, i.e. that proof of ownership of a secret key for the static DH public key implies that the key is authentic w.r.t. the given public identity key. Read more

fn verify(
    id_pk: &PublicKey,
    dh_pk: &PublicKey<C>,
    sig: &Option<Vec<u8>>
) -> bool where
    C: AsRef<[u8]>, 
[src]

Verifies that a given static DH public key is authentic w.r.t. a given public identity key in the context of an optional signature. Read more

fn sign(id_keys: &Keypair, dh_pk: &PublicKey<C>) -> Result<Vec<u8>, NoiseError> where
    C: AsRef<[u8]>, 
[src]

impl Zeroize for X25519[src]

fn zeroize(&mut self)[src]

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

impl RefUnwindSafe for X25519

impl Send for X25519

impl Sync for X25519

impl Unpin for X25519

impl UnwindSafe for X25519

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ProtocolName for T where
    T: AsRef<[u8]>, 
[src]

pub fn protocol_name(&self) -> &[u8][src]

The protocol name as bytes. Transmitted on the network. Read more

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.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V