Skip to content
On this page

Function: canonicalSignature()

TypeScript
function canonicalSignature(signatureBase64: string): string | null;

Defined in: index.ts:379 (opens in a new tab)

The canonical text of a signature value: the bytes verifySignature decodes from it, after an smp prefix if any, as standard padded base64 with no whitespace and no prefix. Every text verifySignature reads as the same bytes has the same canonical text, so a digest over it survives re-encoding. When verifySignature accepts a value it accepts its canonical text too. Null when the value does not decode, or names a variant it refuses.

ParametersLink to this section

ParameterType
signatureBase64string

ReturnsLink to this section

string | null