Trait askar_crypto::jwk::ToJwk[][src]

pub trait ToJwk {
    fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>;

    fn to_jwk_thumbprint(&self, alg: Option<KeyAlg>) -> Result<String, Error> { ... }
fn to_jwk_public(&self, alg: Option<KeyAlg>) -> Result<String, Error> { ... }
fn to_jwk_secret(&self) -> Result<SecretBytes, Error> { ... } }
Expand description

Support for converting a key into a JWK

Required methods

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

Expand description

Write the JWK representation to an encoder

Loading content...

Provided methods

fn to_jwk_thumbprint(&self, alg: Option<KeyAlg>) -> Result<String, Error>[src]

This is supported on crate feature alloc only.
Expand description

Create the JWK thumbprint of the key

fn to_jwk_public(&self, alg: Option<KeyAlg>) -> Result<String, Error>[src]

This is supported on crate feature alloc only.
Expand description

Create a JWK of the public key

fn to_jwk_secret(&self) -> Result<SecretBytes, Error>[src]

This is supported on crate feature alloc only.
Expand description

Create a JWK of the secret key

Loading content...

Implementors

impl ToJwk for Ed25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

impl ToJwk for K256KeyPair[src]

This is supported on crate feature k256 only.

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

impl ToJwk for P256KeyPair[src]

This is supported on crate feature p256 only.

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

impl ToJwk for X25519KeyPair[src]

This is supported on crate feature ed25519 only.

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

impl ToJwk for AnyKey[src]

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

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

This is supported on crate feature bls only.

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

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

This is supported on crate feature aes only.

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

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

This is supported on crate feature chacha only.

fn encode_jwk(&self, enc: &mut JwkEncoder<'_>) -> Result<(), Error>[src]

Loading content...