Skip to main content

Module crypto

Module crypto 

Source
Expand description

Lower level functions, if you want to do something other than JWTs The cryptography of the jsonwebtoken crate is decoupled behind JwtSigner and JwtVerifier traits. These make use of signature’s Signer and Verifier traits respectively. Crypto provider selection is handled by CryptoProvider.

Modules§

aws_lc
aws_lc_rs based CryptoProvider.

Structs§

CryptoProvider
Controls the cryptography used by jsonwebtoken.
JwkUtils
Holds utility functions required for JWK processing. Use the JwkUtils::new_unimplemented function to initialize all values to dummies.

Traits§

JwtSigner
Trait providing the functionality to sign a JWT.
JwtVerifier
Trait providing the functionality to verify a JWT.

Functions§

sign
Take the payload of a JWT, sign it using the algorithm given and return the base64 url safe encoded of the result.
verify
Compares the signature given with a re-computed signature for HMAC or using the public key for RSA/EC.