/** * Encrypts a payload using the provided RSA public key. * @param payload String to encrypt * @param publicKey RSA public key * @returns Base64 encoded string representing encrypted payload */ declare function publicEncryptRsa(payload: string, publicKey: string): Promise; /** * Decrypts a payload using the provided RSA private key. Returns the decrypted payload as a UTF-8 string. * @param encryptedPayload Base64 encoded string representing encrypted payload * @param privateKey * @returns UTF-8 encoded string representing decrypted payload */ declare function privateDecryptRsa(encryptedPayload: string, privateKey: string): Promise; /** * Encrypts a payload using the provided AES key and IV. * @param payload * @param aesKey Base64 encoded string or a Buffer, representing aes key * @param ivHex Optional. Hex encoded string representing IV. If not provided, a random IV will be generated. * It is recommended to always use a new IV for each encryption. * @returns */ declare function encryptAES(payload: string, aesKey: string | Buffer, ivHex?: string): { encryptedData: string; iv: string; }; /** * Decrypts an AES encrypted payload using the provided key and IV. * @param encryptedPayload * @param aesKey Base64 encoded string or a Buffer, representing aes key * @param ivHex Hex encoded string representing IV * @returns */ declare function decryptAES(encryptedPayload: string, aesKey: string | Buffer, ivHex: string): string; export { decryptAES, encryptAES, privateDecryptRsa, publicEncryptRsa };