Trait askar_crypto::repr::KeyGen[][src]

pub trait KeyGen {
    fn generate() -> Result<Self, Error>
    where
        Self: Sized
; fn from_seed(_seed: Seed<'_>) -> Result<Self, Error>
    where
        Self: Sized
, { ... } }
Expand description

Key generation operations

Required methods

fn generate() -> Result<Self, Error> where
    Self: Sized
[src]

Expand description

Generate a new random key.

Loading content...

Provided methods

fn from_seed(_seed: Seed<'_>) -> Result<Self, Error> where
    Self: Sized
[src]

Expand description

Generate a new deterministic key.

Loading content...

Implementors

impl KeyGen for Ed25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn generate() -> Result<Self, Error>[src]

impl KeyGen for K256KeyPair[src]

This is supported on crate feature k256 only.

fn generate() -> Result<Self, Error>[src]

impl KeyGen for P256KeyPair[src]

This is supported on crate feature p256 only.

fn generate() -> Result<Self, Error>[src]

impl KeyGen for X25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn generate() -> Result<Self, Error>[src]

impl<Pk: BlsPublicKeyType> KeyGen for BlsKeyPair<Pk>[src]

This is supported on crate feature bls only.

fn generate() -> Result<Self, Error>[src]

fn from_seed(seed: Seed<'_>) -> Result<Self, Error> where
    Self: Sized
[src]

impl<T: AesType> KeyGen for AesKey<T>[src]

This is supported on crate feature aes only.

fn generate() -> Result<Self, Error>[src]

fn from_seed(seed: Seed<'_>) -> Result<Self, Error> where
    Self: Sized
[src]

impl<T: Chacha20Type> KeyGen for Chacha20Key<T>[src]

This is supported on crate feature chacha only.

fn generate() -> Result<Self, Error>[src]

fn from_seed(seed: Seed<'_>) -> Result<Self, Error> where
    Self: Sized
[src]

Loading content...