/** * Encode a `Buffer` / `Uint8Array` as unpadded base64url. * * @param {Buffer | Uint8Array} bytes * @returns {string} */ export function encode(bytes: Buffer | Uint8Array): string; /** * Decode an unpadded base64url string into a `Buffer`. * Rejects strings containing padding, whitespace, or non-alphabet chars. * * @param {string} text * @returns {Buffer} */ export function decode(text: string): Buffer; /** * Assert that `text` is a well-formed unpadded base64url string and * (optionally) decodes to exactly `expectedBytes` bytes. Errors mention * the JWK member name to make validation output actionable. * * @param {string} text * @param {string} memberName which JWK member the value came from * @param {number} [expectedBytes] * @returns {Buffer} */ export function decodeMember(text: string, memberName: string, expectedBytes?: number): Buffer;