Class CanonicalPayload
Represents a deterministic, provider-neutral payload that can be hashed and later signed by a host or provider package.
public sealed class CanonicalPayload
- Inheritance
-
CanonicalPayload
- Inherited Members
Properties
ArtifactId
Gets the stable artifact identifier bound into the canonical payload.
public string ArtifactId { get; }
Property Value
ArtifactType
Gets the stable artifact type bound into the canonical payload.
public string ArtifactType { get; }
Property Value
CanonicalJson
Gets the deterministic JSON payload to hash or sign.
public string CanonicalJson { get; }
Property Value
CanonicalizationVersion
Gets the canonicalization version used to create the payload bytes.
public string CanonicalizationVersion { get; }
Property Value
HashAlgorithm
Gets the hash algorithm selected for the canonical payload bytes.
public string HashAlgorithm { get; }
Property Value
PayloadSchemaVersion
Gets the payload schema version bound into the canonical payload.
public string PayloadSchemaVersion { get; }
Property Value
Methods
Create(string, string, string, string, IReadOnlyDictionary<string, object?>)
Creates a canonical payload envelope around deterministic artifact content.
public static CanonicalPayload Create(string artifactType, string artifactId, string payloadSchemaVersion, string canonicalizationVersion, IReadOnlyDictionary<string, object?> content)
Parameters
artifactTypestringartifactIdstringpayloadSchemaVersionstringcanonicalizationVersionstringcontentIReadOnlyDictionary<string, object>
Returns
Create(string, string, string, string, string, IReadOnlyDictionary<string, object?>)
Creates a canonical payload envelope around deterministic artifact content with a selected hash algorithm.
public static CanonicalPayload Create(string artifactType, string artifactId, string payloadSchemaVersion, string canonicalizationVersion, string hashAlgorithm, IReadOnlyDictionary<string, object?> content)
Parameters
artifactTypestringartifactIdstringpayloadSchemaVersionstringcanonicalizationVersionstringhashAlgorithmstringcontentIReadOnlyDictionary<string, object>
Returns
ToUtf8Bytes()
Gets the canonical JSON payload as UTF-8 bytes.
public byte[] ToUtf8Bytes()
Returns
- byte[]