/** * Encrypts a given string using AES encryption and a secret key from the environment. * A UUID is prepended to the data to ensure the encrypted token is unique. * * @param {string} token - The string to encrypt. * @returns {string} The encrypted token as a Base64 string. * @throws {Error} If the environment variable `SECRET_KEY` is not set. * * @example * const encryptedToken = encrypt("Hello, World!"); * console.log(encryptedToken); // Example: U2FsdGVkX1... */ export declare function encryptToken(token: string): string; /** * Decrypts a previously encrypted token and extracts the original data. * The function expects the encrypted token to contain a UUID and the original data. * * @param {string} token - The Base64-encoded encrypted token. * @returns {string} The original decrypted data string. * @throws {Error} If the environment variable `SECRET_KEY` is not set. * @throws {Error} If the decrypted token is invalid or improperly formatted. * * @example * const decryptedData = decrypt(encryptedToken); * console.log(decryptedData); // Output: "Hello, World!" */ export declare function decryptToken(ctx: Ctx, token: string): string;