onedionys-data-encryption-utilities

5.0.0 • Public • Published

Welcome to One Dionys - Data Encryption Utilities! 👋

Functions to securely encrypt and decrypt data in web applications, protecting sensitive user data. 💖

💾 Requirements

  • Web Browser - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
  • Internet - Because many use CDN and to make it easier to find solutions to all problems.

🎯 How To Use

Example Syntax

const { encrypt, decrypt } = require('data-encryption-utilities');

const originalData = 'Hello, world!';
const key = 'secretKey';

// Encrypt data
const encryptedData = encrypt(originalData, key);
console.log('Encrypted Data:', encryptedData);

// Decrypt data
const decryptedData = decrypt(encryptedData, key);
console.log('Decrypted Data:', decryptedData);

Explanation

  • This package provides utility functions for encrypting and decrypting data using AES-256-CBC encryption algorithm. The encrypt function takes the data and a secret key as input, encrypts the data, and returns the encrypted result. The decrypt function takes the encrypted data and the same secret key, decrypts the data, and returns the original plaintext.

Return Value

  • encrypt(data, key): Returns the encrypted data as a hexadecimal string.
  • decrypt(data, key): Returns the decrypted data as a UTF-8 encoded string.

📆 Release Date

  • v1.0.0 : 18 March 2024
  • v1.0.1 : 18 March 2024
  • v1.0.2 : 31 March 2024
  • v5.0.0 : 31 March 2024

🧑 Author

📝 License

  • Copyright © 2024 One Dionys
  • One Dionys - Data Encryption Utilities is an open source project licensed under the MIT license

☕️ Suppport & Donation

Love One Dionys - Data Encryption Utilities? Support this project by donating or sharing with others in need.

Made with ❤️ One Dionys

Package Sidebar

Install

npm i onedionys-data-encryption-utilities

Weekly Downloads

14

Version

5.0.0

License

ISC

Unpacked Size

12.4 kB

Total Files

6

Last publish

Collaborators

  • onedionys