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§
- Base64
BigUint - BASE64 encoded big integer
- ECPrivate
Key - ECPublic
Key - Generic
- Generic parameters for JSON Web Key. See RFC 7517, Section 4.
- Json
WebKey Set - A set of Json Web Keys
- RSAPrivate
Key - RSAPrivate
KeyOptimizations - RSAPrivate
KeyOther Primes Info - RSAPublic
Key - Symmetric
Key
Enums§
- ECCurve
Parameter - Error
- Json
WebKey - A JSON Web Key
- KeyType
- A type of JWK. See RFC 7518 Section 6.1.
- KeyUse