1# Generated by the protocol buffer compiler. DO NOT EDIT!
2# sources: envelope.proto
3# plugin: python-betterproto
4# This file has been @generated
5
6from dataclasses import dataclass
7from typing import List
8
9import betterproto
10
11
12@dataclass(eq=False, repr=False)
13class Envelope(betterproto.Message):
14 """An authenticated message of arbitrary type."""
15
16 payload: bytes = betterproto.bytes_field(1)
17 """
18 Message to be signed. (In JSON, this is encoded as base64.) REQUIRED.
19 """
20
21 payload_type: str = betterproto.string_field(2)
22 """String unambiguously identifying how to interpret payload. REQUIRED."""
23
24 signatures: List["Signature"] = betterproto.message_field(3)
25 """
26 Signature over: PAE(type, payload) Where PAE is defined as: PAE(type,
27 payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP +
28 payload + = concatenation SP = ASCII space
29 [0x20] "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31] LEN(s)
30 = ASCII decimal encoding of the byte length of s, with no leading zeros
31 REQUIRED (length >= 1).
32 """
33
34
35@dataclass(eq=False, repr=False)
36class Signature(betterproto.Message):
37 sig: bytes = betterproto.bytes_field(1)
38 """Signature itself. (In JSON, this is encoded as base64.) REQUIRED."""
39
40 keyid: str = betterproto.string_field(2)
41 """
42 *Unauthenticated* hint identifying which public key was used. OPTIONAL.
43 """