-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathlib.rs
More file actions
65 lines (55 loc) · 1.58 KB
/
Copy pathlib.rs
File metadata and controls
65 lines (55 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// SPDX-FileCopyrightText: 2022 Profian Inc. <opensource@profian.com>
// SPDX-License-Identifier: Apache-2.0 OR MIT
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
)]
#![forbid(unsafe_code)]
#![warn(
clippy::panic,
clippy::panic_in_result_fn,
clippy::unwrap_used,
missing_docs,
rust_2018_idioms,
unused_lifetimes,
unused_qualifications
)]
extern crate alloc;
pub mod crypto;
pub mod legacy;
pub mod thumbprint;
mod key;
mod prm;
pub use key::*;
pub use prm::{Class, Operations, Parameters, Thumbprint};
pub use thumbprint::{JwkThumbprint, ThumbprintError};
pub use jose_b64;
pub use jose_jwa;
use serde::{Deserialize, Serialize};
/// A set of JSON Web Keys.
///
/// This type is defined in [RFC7517 Section 5].
///
/// [RFC7517 Section 5]: https://datatracker.ietf.org/doc/html/rfc7517#section-5
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct JwkSet {
/// The keys in the set.
pub keys: alloc::vec::Vec<Jwk>,
}
/// A JSON Web Key.
///
/// This type is defined in [RFC7517 Section 4].
///
/// [RFC7517 Section 4]: https://datatracker.ietf.org/doc/html/rfc7517#section-4
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct Jwk {
/// The key material.
#[serde(flatten)]
pub key: Key,
/// The key parameters.
#[serde(flatten)]
pub prm: Parameters,
}