/** * @typedef {Object} DecodedJwe * @property {Record} header Protected (JOSE) header. * @property {Buffer} encryptedKey Wrapped CEK (empty for `dir` / `ECDH-ES`). * @property {Buffer} iv Content-encryption Initialization Vector. * @property {Buffer} ciphertext The AEAD ciphertext. * @property {Buffer} tag The AEAD authentication tag. */ /** * Split and decode a compact JWE without decrypting it. * * @param {string} token * @returns {DecodedJwe} */ declare function decode(token: string): DecodedJwe; /** * Return only the protected header. Handy for `alg` / `enc` / `kid` * extraction before calling `decrypt` with a resolver. * * @param {string} token * @returns {Record} */ declare function decodeProtectedHeader(token: string): Record; /** * Split a compact JWE into its five base64url segments — protected * header, encrypted key, IV, ciphertext, authentication tag (RFC 7516 * §3.1 / §7.1). Exported for internal reuse by `decrypt`. * * @param {string} token * @returns {{ encHeader: string, encKey: string, encIv: string, encCiphertext: string, encTag: string }} */ declare function _splitCompact(token: string): { encHeader: string; encKey: string; encIv: string; encCiphertext: string; encTag: string; }; type DecodedJwe = { /** * Protected (JOSE) header. */ header: Record; /** * Wrapped CEK (empty for `dir` / `ECDH-ES`). */ encryptedKey: Buffer; /** * Content-encryption Initialization Vector. */ iv: Buffer; /** * The AEAD ciphertext. */ ciphertext: Buffer; /** * The AEAD authentication tag. */ tag: Buffer; }; export { _splitCompact, decode, decodeProtectedHeader }; export type { DecodedJwe };