export declare const PKCS7_INVALID = "invalid ciphertext"; /** * Apply PKCS7 padding to `data` so the result length is a multiple of 16. * Padding length is always 1-16 bytes so a full pad block is appended when * `data.length` is already block-aligned. * @param data Input bytes of any length * @returns New Uint8Array padded to the next 16-byte boundary */ export declare function pkcs7Pad(data: Uint8Array): Uint8Array; /** * Remove PKCS7 padding from a block-aligned buffer in constant time. * * Branch-free over all secret bits, padding length and per-byte comparisons * are accumulated into a single `bad` flag with no early exit. Closes the * Vaudenay 2002 padding-oracle surface. Throws a single generic * `RangeError('invalid ciphertext')` for every failure mode: empty input, * non-block-aligned length, padding byte out of range 1-16, and any per-byte * mismatch in the padding region. * @param data Block-aligned ciphertext (length must be a multiple of 16) * @returns Plaintext with padding removed */ export declare function pkcs7Strip(data: Uint8Array): Uint8Array;