basalt / audit/src / canonicalAuditEntry
Function: canonicalAuditEntry()
> canonicalAuditEntry(entry, scheme?): string
Defined in: audit/src/chain.ts:102
Canonical, stable serialization of every field the hash covers. Explicit field list (never "whatever keys the object has"), sorted keys, null for an absent optional, and a format version so the scheme can evolve.
Without scheme this is the v1 form. With it, the v2 form: the same fields plus alg and kid, so the digest authenticates which algorithm and which key produced it — relabelling an entry's key id breaks its hash.
Parameters
entry
scheme?
alg
keyId?
string
Returns
string