API reference / @evolu/common / Crypto / padmePaddedLength
Function: padmePaddedLength()
function padmePaddedLength(length): number & Brand<"Int"> & Brand<"NonNegative">;
Defined in: packages/common/src/Crypto.ts:175
Returns the PADMÉ padded length for a given input length.
PADMÉ limits information leakage about the length of the plain-text for a wide range of encrypted data sizes. See the PURBs paper for details: https://bford.info/pub/sec/purb.pdf
Parameters
Parameter | Type |
---|---|
length | number & Brand <"Int" > & Brand <"NonNegative" > |