UNPKG

afridho-encrypt

Version:

A simple AES encryption and decryption utility

15 lines (14 loc) 488 B
/** * Encrypts a given text using AES encryption. * * @param text - The plain text to encrypt. * @returns The encrypted text as a base64-encoded string. */ export declare const encrypt: (text: string) => string; /** * Decrypts a given AES-encrypted text back to its original plain text. * * @param text - The encrypted text to decrypt. * @returns The decrypted plain text. If decryption fails, returns an empty string. */ export declare const decrypt: (text: string) => string;