outers
Version:
outers - a all in one package for your day to day use
39 lines (35 loc) • 1.79 kB
TypeScript
type str = string;
/**
* The function reActEncrypt takes a string of data and encrypts it using the AES algorithm with a
* specified key.
* @param {str} Data - The `Data` parameter is the string that you want to encrypt. It is the data that
* you want to keep secure and confidential.
* @param [Key=YourKey] - The "Key" parameter is an optional parameter that represents the encryption
* key used to encrypt the data. If no key is provided, the default value is set to 'YourKey'.
* @returns the encrypted data as a string.
*/
/**
Encrypt function encrypts a string of data using the provided key.
// It uses the CryptoJS library to perform the AES encryption.
//
// @param {string} data - The `data` parameter is the string that you want to encrypt. It is the data that
// you want to keep secure and confidential.
//
// @param {string} [Key] - The `key` parameter is an optional parameter that represents the encryption
// key used to encrypt the data. If no key is provided.
//
// @returns the encrypted data as a string.
*/
export declare function Encrypt(data: str, Key: str): Promise<string>;
/**
EncryptSync function encrypts a string of data using the provided key.
It uses the CryptoJS library to perform the AES encryption.
This function operates synchronously, which can impact performance in some scenarios.
@param {string} Data - The `data` parameter is the string that you want to encrypt. It is the data that
you want to keep secure and confidential.
@param {string} [Key] - The `key` parameter is an optional parameter that represents the encryption
key used to encrypt the data. If no key is provided, the default value is set to 'YourKey'.
*@returns the encrypted data as a string.
*/
export declare function EncryptSync(Data: str, Key: str): string;
export {};