RustCrypto: JOSE JWS
Pure Rust implementation of the JSON Web Signature (JWS) component of the Javascript Object Signing and Encryption (JOSE) specification as described in RFC7515.
JSON Web Signatures are a way of sharing unencrypted data in a way that the sender can be verified. A JWS has the following contents:
- A verifyable payload
- One or more signatures including:
- An optional unprotected header (nonverifyable) containing hints about the algorithm
- An optional protected header (verifyable using the signature)
- A signature
A client can use the information provided in a JWS to verify the integrity of the data, meaning the client can be sure that the data did come from the intended sender.
use ;
let jws_json = json!;
let General = from_value.unwrap else ;
assert_eq!;
let payload = jws.payload.unwrap;
let payload_str = from_utf8.unwrap;
assert_eq!
Minimum Supported Rust Version
This crate requires Rust 1.65 at a minimum.
We may change the MSRV in the future, but it will be accompanied by a minor version bump.
License
Licensed under either of:
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.