UNPKG

radius-read

Version:

Realtime Dashboard

72 lines (71 loc) 1.89 kB
/** * CipherService provides methods for encrypting and decrypting strings using AES-256-CBC. */ export declare class CipherService { /** * The algorithm used for encryption and decryption. * @date Jun 26, 2025 11:03:22 AM * @author Biswaranjan Nayak * * @private * @type {string} */ private static ALGORITHM; /** * Key used for AES encryption and decryption. * @date Jun 26, 2025 11:03:37 AM * @author Biswaranjan Nayak * * @private * @type {*} */ private static KEY; /** * IV (Initialization Vector) used for AES encryption and decryption. * @date Jun 26, 2025 11:03:51 AM * @author Biswaranjan Nayak * * @private * @type {*} */ private static IV; /** * AES cipher key used for encryption and decryption in static methods. * @date Jun 26, 2025 11:07:13 AM * @author Biswaranjan Nayak * * @private * @type {string} */ private static AES_CHIPERKEY; /** * Logger instance for logging debug information. */ constructor(); /** * Encrypts the given text using AES-256-CBC algorithm. * @param text * @returns */ static encrypt(text: string): string; /** * Decrypts the given text using AES-256-CBC algorithm. * @param text * @returns */ static decrypt(text: string): string; /** * AES encrypts the given text and optionally encodes it as a URI component. * @param textToEncrypt * @param isUri * @returns */ static aesEncrypt(textToEncrypt: string, isUri?: boolean): string; /** * Aes decrypts the given text and optionally decodes it from a URI component. * @param textToDecrypt * @param isUri * @returns */ static aesDecrypt(textToDecrypt: string, isUri?: boolean): string; }