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.
The password to pad.
A 32-byte padded password.
const padded = padPassword(new Uint8Array([1, 2, 3])) // Returns 32-byte array Copy
const padded = padPassword(new Uint8Array([1, 2, 3])) // Returns 32-byte array
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.