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.

Trait Implementations

Formats the value using the given formatter. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.