Crate jsonwebkey_convert

Source
Expand description

§jsonwebkey-convert

Handle Json Web Key without nightly rust compiler.

§Load JSON Web Key Set

use jsonwebkey_convert::JsonWebKeySet;

let jwks: JsonWebKeySet = jwks_str.parse()?;

§Convert PEM to JWK

pem_support feature is required.

use jsonwebkey_convert::*;
use jsonwebkey_convert::der::FromPem;

let rsa_jwk = RSAPublicKey::from_pem(pem_data)?;
let jwk_byte_vec = serde_json::to_string(&rsa_jwk);

§Convert JWK to PEM

pem_support feature is required.

use jsonwebkey_convert::*;
use jsonwebkey_convert::der::ToPem;

let rsa_jwk: RSAPublicKey = jwk_data.parse()?;
let pem_data = rsa_jwk.to_pem()?;

Structs§

Base64BigUint
BASE64 encoded big integer
ECPrivateKey
ECPublicKey
Generic
Generic parameters for JSON Web Key. See RFC 7517, Section 4.
JsonWebKeySet
A set of Json Web Keys
RSAPrivateKey
RSAPrivateKeyOptimizations
RSAPrivateKeyOtherPrimesInfo
RSAPublicKey
SymmetricKey

Enums§

ECCurveParameter
Error
JsonWebKey
A JSON Web Key
KeyType
A type of JWK. See RFC 7518 Section 6.1.
KeyUse