Skip to main content

RegisteredHeader

Struct RegisteredHeader 

Source
pub struct RegisteredHeader {
    pub cek_algorithm: Algorithm,
    pub enc_algorithm: Algorithm,
    pub compression_algorithm: Option<CompressionAlgorithm>,
    pub media_type: Option<String>,
    pub content_type: Option<String>,
    pub web_key_url: Option<String>,
    pub web_key: Option<String>,
    pub key_id: Option<String>,
    pub x509_url: Option<String>,
    pub x509_chain: Option<Vec<String>>,
    pub x509_fingerprint: Option<String>,
    pub critical: Option<Vec<String>>,
}
Expand description

Registered JWE header fields. The fields are defined by RFC 7516#4.1

Fields§

§cek_algorithm: Algorithm

Algorithm used to encrypt or determine the value of the Content Encryption Key

§enc_algorithm: Algorithm

Content encryption algorithm used to perform authenticated encryption on the plaintext to produce the ciphertext and the Authentication Tag

§compression_algorithm: Option<CompressionAlgorithm>

Compression algorithm applied to plaintext before encryption, if any. Compression is not supported at the moment. Must only appear in integrity protected header.

§media_type: Option<String>

Media type of the complete JWE. Serialized to typ. Defined in RFC7519#5.1 and additionally RFC7515#4.1.9. The “typ” value “JOSE” can be used by applications to indicate that this object is a JWS or JWE using the JWS Compact Serialization or the JWE Compact Serialization. The “typ” value “JOSE+JSON” can be used by applications to indicate that this object is a JWS or JWE using the JWS JSON Serialization or the JWE JSON Serialization. Other type values can also be used by applications.

§content_type: Option<String>

Content Type of the secured payload. Typically used to indicate the presence of a nested JOSE object which is signed or encrypted. Serialized to cty. Defined in RFC7519#5.2 and additionally RFC7515#4.1.10.

§web_key_url: Option<String>

The JSON Web Key Set URL. This is currently not implemented (correctly). Serialized to jku. Defined in RFC7515#4.1.2.

§web_key: Option<String>

The JSON Web Key. This is currently not implemented (correctly). Serialized to jwk. Defined in RFC7515#4.1.3.

§key_id: Option<String>

The Key ID. This is currently not implemented (correctly). Serialized to kid. Defined in RFC7515#4.1.3.

§x509_url: Option<String>

X.509 Public key cerfificate URL. This is currently not implemented (correctly). Serialized to x5u. Defined in RFC7515#4.1.5.

§x509_chain: Option<Vec<String>>

X.509 public key certificate chain. This is currently not implemented (correctly). Serialized to x5c. Defined in RFC7515#4.1.6.

§x509_fingerprint: Option<String>

X.509 Certificate thumbprint. This is currently not implemented (correctly). Also not implemented, is the SHA-256 thumbprint variant of this header. Serialized to x5t. Defined in RFC7515#4.1.7.

§critical: Option<Vec<String>>

List of critical extended headers. This is currently not implemented (correctly). Serialized to crit. Defined in RFC7515#4.1.11.

Trait Implementations§

Source§

impl Clone for RegisteredHeader

Source§

fn clone(&self) -> RegisteredHeader

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RegisteredHeader

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RegisteredHeader

Source§

fn default() -> RegisteredHeader

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RegisteredHeader

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<RegisteredHeader> for Header<(), ()>

Source§

fn from(registered: RegisteredHeader) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for RegisteredHeader

Source§

fn eq(&self, other: &RegisteredHeader) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for RegisteredHeader

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for RegisteredHeader

Source§

impl StructuralPartialEq for RegisteredHeader

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,