API reference@evolu/commonCrypto › createPadmePaddedLength

function createPadmePaddedLength(
  length: number &
    Brand<"NonNaN"> &
    Brand<"Finite"> &
    Brand<"Int"> &
    Brand<"NonNegative">,
): number &
  Brand<"NonNaN"> &
  Brand<"Finite"> &
  Brand<"Int"> &
  Brand<"NonNegative">;

Defined in: packages/common/src/Crypto.ts:279

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