/** * Encodes the string as UTF-8 bytes. The plain implementation is used on purpose. * It does not depend on `TextEncoder` or `Buffer`, so the same code works in * Node.js and in every browser, including plain http:// pages. * * @param {string} string The string to encode. * @returns {number[]} */ export declare function stringToUtf8Bytes(string: string): number[]; /** * Decodes UTF-8 bytes back into a string. * * @param {number[]} bytes The bytes to decode. * @returns {string} */ export declare function utf8BytesToString(bytes: number[]): string; /** * Encodes the bytes as a base64 string (standard alphabet, with padding). * * @param {number[]} bytes The bytes to encode. * @returns {string} */ export declare function bytesToBase64(bytes: number[]): string; /** * Decodes a base64 string (standard or URL-safe alphabet, padding optional) * back into bytes. Returns `null` when the string is not valid base64. * * @param {string} base64 The base64 string to decode. * @returns {number[]|null} */ export declare function base64ToBytes(base64: string): number[] | null; /** * Encodes the string as a URL-safe base64 string without padding (the same * format as the JWT payload segment). * * @param {string} string The string to encode. * @returns {string} */ export declare function stringToBase64Url(string: string): string; /** * Decodes a base64 (standard or URL-safe) string back into a string. * Returns `null` when the input is not valid base64. * * @param {string} base64 The base64 string to decode. * @returns {string|null} */ export declare function base64ToString(base64: string): string | null; /** * Parses a date in the "YYYY-MM-DD" format into the epoch milliseconds of its * UTC midnight. Returns `null` when the date is malformed or does not exist in * the calendar (for example "2027-02-30"). Unlike the generator side, the * reader never throws on a bad date - a broken payload simply makes the key * unreadable. * * @param {string} isoDate The date to parse. * @returns {number|null} */ export declare function parseIsoDateToTimestamp(isoDate: unknown): number | null;