cyber-encrypt

1.0.0 • Public • Published

cyber-encrypt

cyber-encrypt is a TypeScript library that provides functions for encrypting and decrypting JSON data using the PBKDF2 algorithm and AES encryption. It aims to provide a secure and straightforward way to handle sensitive information.

Installation

npm install cyber-encrypt

Usage

encryptJSON
import { encryptJSON } from 'cyber-encrypt';

const jsonData = {
  username: 'john_doe',
  password: 'secure_password123',
};

const encryptedData = encryptJSON(jsonData);
console.log('Encrypted Data:', encryptedData);
decryptJSON
import { decryptJSON } from 'cyber-encrypt';

const encryptedData = '...'; // Replace with the actual encrypted data
const decryptedData = decryptJSON(encryptedData);
console.log('Decrypted Data:', decryptedData);

Configuration

In the core/config.ts file, you can customize the encryption parameters such as key size, iterations, and special character escape sequences.

File Structure

  • core/config.ts: Contains configuration parameters for encryption.
  • json/decryptJSON.ts: Provides a function to decrypt JSON data.
  • json/encryptJSON.ts: Provides a function to encrypt JSON data.
  • text/decryptText.ts: Provides a function to decrypt text.
  • text/encryptText.ts: Provides a function to encrypt text.

Important Note

Ensure that you keep your encryption passphrase (ENV_CYBER_ENCRYPT_PASS_KEY) secure and do not expose it in public repositories.

Contributing

Feel free to contribute by submitting bug reports, feature requests, or pull requests. We welcome your feedback and involvement!

License

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

Package Sidebar

Install

npm i cyber-encrypt

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

14.2 kB

Total Files

17

Last publish

Collaborators

  • ala_garbaa