pdf-lite - v1.0.1
    Preparing search index...

    Function padPassword

    • Pads a password to exactly 32 bytes using the PDF standard padding. If the password is shorter than 32 bytes, it is padded with bytes from DEFAULT_PADDING. If the password is 32 bytes or longer, only the first 32 bytes are used.

      Parameters

      Returns ByteArray

      A 32-byte padded password.

      const padded = padPassword(new Uint8Array([1, 2, 3])) // Returns 32-byte array