crypt-hpulido
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

crypto-hpulido

Encrypt and decrypt data using AES encryption with this lightweight TypeScript library.

Installation

npm install crypto-hpulido

Usage

import { aesEncrypt, aesDecrypt } from 'crypto-hpulido';

// Encrypt a plain text
const plaintext = 'Hello, world!';
const ciphertext = await aesEncrypt(plaintext, 'key');

// Decrypt the ciphertext
const decryptedText = await aesDecrypt(ciphertext, 'key');

console.log('Original Text:', plaintext);
console.log('Encrypted Text:', ciphertext);
console.log('Decrypted Text:', decryptedText);

Note:

AES key data must be 128 or 256 bits. Ensure that your encryption key meets this requirement.

Contributing

Feel free to contribute to this project. If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Readme

Keywords

Package Sidebar

Install

npm i crypt-hpulido

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

6 kB

Total Files

6

Last publish

Collaborators

  • hpulido