Computes PASETO Pre-Authentication Encoding (PAE).
PAE standardizes a list of arbitrary byte arrays into an unambiguous, length-prefixed sequence to prevent canonicalization attacks.
Format: LE64(count) || LE64(len(p0)) || p0 || LE64(len(p1)) || p1 ...
LE64(count) || LE64(len(p0)) || p0 || LE64(len(p1)) || p1 ...
An array of Uint8Array buffers to encode in order.
Uint8Array
A single concatenated Uint8Array buffer containing the full PAE payload.
const encoded = pae([ new TextEncoder().encode("v3.local."), nonce, ciphertext]); Copy
const encoded = pae([ new TextEncoder().encode("v3.local."), nonce, ciphertext]);
Computes PASETO Pre-Authentication Encoding (PAE).
PAE standardizes a list of arbitrary byte arrays into an unambiguous, length-prefixed sequence to prevent canonicalization attacks.
Format:
LE64(count) || LE64(len(p0)) || p0 || LE64(len(p1)) || p1 ...