Struct coset::Header [−][src]
pub struct Header {
pub alg: Option<Algorithm>,
pub crit: Vec<RegisteredLabel<HeaderParameter>>,
pub content_type: Option<ContentType>,
pub key_id: Vec<u8>,
pub iv: Vec<u8>,
pub partial_iv: Vec<u8>,
pub counter_signatures: Vec<CoseSignature>,
pub rest: BTreeMap<Label, Value>,
}
Expand description
Structure representing a common COSE header map.
header_map = {
Generic_Headers,
* label => values
}
Generic_Headers = (
? 1 => int / tstr, ; algorithm identifier
? 2 => [+label], ; criticality
? 3 => tstr / int, ; content type
? 4 => bstr, ; key identifier
? 5 => bstr, ; IV
? 6 => bstr, ; Partial IV
? 7 => COSE_Signature / [+COSE_Signature] ; Counter signature
)
Fields
alg: Option<Algorithm>
Cryptographic algorithm to use
crit: Vec<RegisteredLabel<HeaderParameter>>
Critical headers to be understood
content_type: Option<ContentType>
Content type of the payload
key_id: Vec<u8>
Key identifier.
iv: Vec<u8>
Full initialization vector
partial_iv: Vec<u8>
Partial initialization vector
counter_signatures: Vec<CoseSignature>
Counter signature
rest: BTreeMap<Label, Value>
Any additional header values.
Implementations
Constructor from a cbor::Value
that holds a bstr
encoded header.
Convert this header to a bstr
encoded map, as a cbor::Value
.
Trait Implementations
Create an object instance by reading serialized CBOR data from std::io::Read
instance.
Create an object instance from serialized CBOR data in a slice.
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Header
impl UnwindSafe for Header
Blanket Implementations
Mutably borrows from an owned value. Read more