Struct dgc::Cwt [−][src]
pub struct Cwt {
pub header: CwtHeader,
pub payload: DgcContainer,
pub signature: Vec<u8>,
// some fields omitted
}
Expand description
A representation of a CWT (CBOR Web Token).
In the context of DGC only a portion of the original CWT specification is actually used (COSE_Sign1) so this module is limited to implementing exclusively that portion.
Fields
header: CwtHeader
A simplified representation of the original CWT headers (protected + unprotected)
Stores only the kid
and alg
payload: DgcContainer
The CWT payload parse as a DgcContainer
signature: Vec<u8>
The raw bytes of the signature
Implementations
Creates the sig structure needed to be able to verify the signature against a public key.