This package provides functions for encrypting and decrypting data using the AES encryption algorithm.
You can install this package via npm:
npm install data-decr-encr
const { encryptData, decryptData } = require('data-decr-encr');
// Encrypt data
const encrypted = encryptData('Hello, World!');
// Decrypt data
const decrypted = decryptData(encrypted);
console.log('Encrypted:', encrypted);
console.log('Decrypted:', decrypted);
Encrypts the provided data using AES encryption algorithm.
data
(string): The data to encrypt.
Returns the encrypted data in base64 encoding.
Decrypts the provided encrypted data using AES encryption algorithm.
encryptedData
(string): The encrypted data in base64 encoding.
Returns the decrypted data.
Contributions are welcome! Please feel free to submit a pull request or open an issue if you encounter any problems or have suggestions for improvements.
This package is licensed under the MIT License. See the LICENSE file for details.