/** * Encode a Uint8Array or string to Base64. * Uses TextEncoder + manual base64 to support binary data correctly. */ export declare function encodeBase64(data: Uint8Array | string): string; /** * Decode a Base64 string to Uint8Array. */ export declare function decodeBase64(data: string): Uint8Array; /** * Encode text using Quoted-Printable (RFC 2045). */ export declare function encodeQP(text: string): string; /** * Encode an email header value per RFC 2047. * Non-ASCII values become: =?UTF-8?B??= */ export declare function encodeHeader(value: string): string; /** * Returns true if the string contains non-ASCII characters * and therefore requires RFC 2047 encoding in headers. */ export declare function needsEncoding(text: string): boolean; /** * Encode bytes to Base64url (RFC 4648 §5) without padding. * Used by Web Push (VAPID / RFC 8291) and similar protocols. */ export declare function encodeBase64Url(data: Uint8Array | string): string; /** * Decode a Base64url (RFC 4648 §5) string to bytes. * Accepts both padded and unpadded input. */ export declare function decodeBase64Url(data: string): Uint8Array; /** Decode bytes to UTF-8 string. */ export declare function decodeUtf8(bytes: Uint8Array): string; /** Encode string to UTF-8 bytes. */ export declare function encodeUtf8(text: string): Uint8Array;