Expand description
Algorithms capable of signing and verifying tokens. By default only the
hmac
crate’s Hmac
type is supported. For more algorithms, enable the
feature openssl
and see the openssl
module. The none
algorithm is explicitly not supported.
§Examples
use hmac::{Hmac, Mac};
use sha2::Sha256;
let hs256_key: Hmac<Sha256> = Hmac::new_from_slice(b"some-secret").unwrap();
Modules§
- openssl
- OpenSSL support through the openssl crate. Note that private keys can only be used for signing and that public keys can only be used for verification.
- rust_
crypto - RustCrypto implementations of signing and verifying algorithms. According to that organization, only hmac is safely implemented at the moment.
- store
Enums§
- Algorithm
Type - The type of an algorithm, corresponding to the JWA specification.
Traits§
- Signing
Algorithm - An algorithm capable of signing base64 encoded header and claims strings. strings.
- Verifying
Algorithm - An algorithm capable of verifying base64 encoded header and claims strings.