Cargo Features
jwt2 has no features set by default.
[dependencies]
jwt2 = { version = "0.1.0-alpha.0", features = ["hmac-sha2", "rsa-pkcs1", "ecdsa", "rand"] }
- hmac-sha2
-
NOTE: Maybe create features for each algorithm and group them with more features?
It might be excessive.Affects
sign::hmac_sha2
… - rsa-pkcs1
-
This name might be changed sometime since it may not be a good name.
Enables rsa, sha2, and signature
Affects
sign::rsa_pkcs1
… - ecdsa
-
"dep:p521"
Enables ecdsa, signature, ecdsa of p256 and p384
Affects
sign::ecdsa
… - rand
-
Will allow for generation of keys.
This is mostly a utility.
Note that in some cases rand_core may be included either way (example: the rsa crate)Enables rand_core