1.0.7 β€’ Published 4 months ago

cryptia v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

CryptiaJS πŸ”

CryptiaJS is a lightweight and secure JavaScript library for encrypting and decrypting text using a substitution cipher. Whether you're safeguarding sensitive data in web applications or adding encryption to your server-side projects, CryptiaJS is designed to be fast, reliable, and easy to use. ⚑

Your data stays protectedβ€”as long as you keep your encryption key private.

πŸš€ Installation

Install CryptiaJS via npm:

npm i cryptia

Or clone the GitHub repository:

git clone https://github.com/chukwunonsoprosper/cryptia
cd cryptia

πŸ›  Usage

To test the library, run:

npm run test

To spin up a customizable workspace, run:

npm run dev

You can also link workspace.js to your project directory to integrate CryptiaJS easily.

Example

/**
 * Import Cryptia and required dependencies.
 */
import Cryptia from 'cryptia';
import fs from 'fs';

// Initialize Cryptia with custom settings.
const cryptia = Cryptia({
    obfuscationLevel: 10,
    logging: true,
    preserveWhitespace: true
});

/**
 * Encrypt and decrypt text with a secure key.
 */
const plainText = 'This is a secret message.πŸ€£πŸ˜‚';
const encryptionKey = 'MySecureKey123';

const encryptedResult = cryptia.encrypt(plainText, encryptionKey, result => {
    console.log('Encryption callback:', result);
});
console.log('Encrypted Text:', encryptedResult.data);

const decryptedResult = cryptia.decrypt(
    encryptedResult.data,
    encryptionKey,
    result => {
        console.log('Decryption callback:', result);
    }
);
console.log('Decrypted Text:', decryptedResult.data);

if (plainText === decryptedResult.data) {
    console.log('Decryption successful!');
} else {
    console.log('Decryption failed!');
}

πŸ”₯ What’s New in v1.0.6?

  • βœ… Stronger security – Your encrypted data stays safe as long as your encryption key remains private.
  • βœ… Better performance – Optimized for speed and efficiency.
  • βœ… Cleaner code – More maintainable and readable.
  • βœ… Improved documentation – Making integration smoother than ever.

πŸ“œ License

This project is licensed under the MIT License.

πŸ‘¨β€πŸ’» Contributors

Builder: Chukwunonso Prosper & contributors.

🌟 Get Involved!

πŸ’™ Don't forget to star the project on GitHub! πŸ”— GitHub Repository

πŸ“– Read the full guide: npmjs.com/package/cryptia

πŸ“’ Follow for updates & discussions: