Trait askar_crypto::jwk::FromJwk[][src]

pub trait FromJwk: Sized {
    fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>;

    fn from_jwk(jwk: &str) -> Result<Self, Error> { ... }
fn from_jwk_slice(jwk: &[u8]) -> Result<Self, Error> { ... } }
Expand description

Support for loading a key instance from a JWK

Required methods

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

Expand description

Import the key from a pre-parsed JWK

Loading content...

Provided methods

fn from_jwk(jwk: &str) -> Result<Self, Error>[src]

Expand description

Import the key from a JWK string reference

fn from_jwk_slice(jwk: &[u8]) -> Result<Self, Error>[src]

Expand description

Import the key from a JWK byte slice

Loading content...

Implementations on Foreign Types

impl FromJwk for Box<AnyKey>[src]

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

impl FromJwk for Arc<AnyKey>[src]

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

Loading content...

Implementors

impl FromJwk for Ed25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

impl FromJwk for K256KeyPair[src]

This is supported on crate feature k256 only.

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

impl FromJwk for P256KeyPair[src]

This is supported on crate feature p256 only.

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

impl FromJwk for X25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

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

This is supported on crate feature bls only.

fn from_jwk_parts(jwk: JwkParts<'_>) -> Result<Self, Error>[src]

Loading content...