Struct coset::CoseMac0 [−][src]
pub struct CoseMac0 {
pub protected: Header,
pub unprotected: Header,
pub payload: Option<Vec<u8>>,
pub tag: Vec<u8>,
}
Expand description
Structure representing a message with authentication code (MAC) where the relevant key is implicit.
COSE_Mac0 = [
Headers,
payload : bstr / nil,
tag : bstr,
]
Fields
protected: Header
unprotected: Header
payload: Option<Vec<u8>>
tag: Vec<u8>
Implementations
Verify the tag
value using the provided mac
function, feeding it
the tag
value and the combined to-be-MACed data (in that order).
Panics
This function will panic if the payload
has not been set.
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
Create an object instance by reading serialized CBOR data from std::io::Read
instance,
expecting an initial tag value. Read more
Create an object instance from serialized CBOR data in a slice, expecting an initial tag value. Read more
Serialize this object to a vector, including initial tag.
Serialize this object to a std::io::Write
instance, including initial tag.
Auto Trait Implementations
impl RefUnwindSafe for CoseMac0
impl UnwindSafe for CoseMac0
Blanket Implementations
Mutably borrows from an owned value. Read more