API reference / @evolu/common / Crypto / createPadmePaddedLength
Function: createPadmePaddedLength()
function createPadmePaddedLength(
length,
): number & Brand<"Int"> & Brand<"NonNegative">;
Defined in: packages/common/src/Crypto.ts:183
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"> |