[][src]Struct tentacle_secio::SecioKeyPair

pub struct SecioKeyPair { /* fields omitted */ }

Key pair of asymmetric encryption algorithm

Methods

impl SecioKeyPair[src]

pub fn secp256k1_generated() -> SecioKeyPair[src]

Generates a new random sec256k1 key pair.

pub fn secp256k1_raw_key<K>(key: K) -> Result<SecioKeyPair, SecioError> where
    K: AsRef<[u8]>, 
[src]

Builds a SecioKeyPair from a raw secp256k1 32 bytes private key.

pub fn public_key(&self) -> PublicKey[src]

Returns the public key corresponding to this key pair.

pub fn peer_id(&self) -> PeerId[src]

Generate Peer id

Trait Implementations

impl Clone for SecioKeyPair[src]

impl Debug for SecioKeyPair[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> 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>,