import type { Result, PaddingError } from '@private.me/shared';
/**
 * PKCS#7 pad data to a multiple of blockSize bytes.
 * Always adds at least 1 byte of padding, even when already aligned.
 *
 * @param data - Input bytes to pad
 * @param blockSize - Block size in bytes (must be 1–255)
 * @returns Padded byte array
 */
export declare function pkcs7Pad(data: Uint8Array, blockSize: number): Uint8Array;
/**
 * Remove PKCS#7 padding. Validates that padding bytes are consistent.
 * Returns an error if padding is invalid (possible tampering).
 *
 * @param data - Padded byte array
 * @param blockSize - Block size used during padding (must be 1–255)
 * @returns Unpadded bytes, or PaddingError if invalid
 */
export declare function pkcs7Unpad(data: Uint8Array, blockSize: number): Result<Uint8Array, PaddingError>;
