1.0.0 • Published 6 months ago

encrypt-js-vault v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

Password Encryption Module

Overview

This module provides a simple yet effective way to encrypt and decrypt text in JavaScript, ideal for handling sensitive information like passwords. It leverages robust cryptographic methods to ensure data security.

Installation

To use this module, first install it using npm:

npm install encrypt-js-vault

Usage

The module exports encrypt and decrypt functions. Here's how to use them:

Encrypting Text

const { encrypt, decrypt } = require('encrypt-js-vault');

// Original text
const originalText = 'password123';

// Encrypt the text
const encryptedText = encrypt(originalText);
console.log('Encrypted Text:', encryptedText);
// Output: Encrypted Text: [Encrypted String]

Decrypting Text

// Decrypt the text
const decryptedText = decrypt(encryptedText);
console.log('Decrypted Text:', decryptedText);
// Output: Decrypted Text: password123

Example

Here's a complete example demonstrating the encryption and decryption process:

const { encrypt, decrypt } = require('encrypt-js-vault');

const originalText = 'password123';
const encryptedText = encrypt(originalText);
const decryptedText = decrypt(encryptedText);

console.log('Original Text:', originalText);
// Output: password123

console.log('Encrypted Text:', encryptedText);
// Output: [Encrypted String]

console.log('Decrypted Text:', decryptedText);
// Output: password123

Contributing

Contributions to enhance the module are welcome. Please fork the repository and submit a pull request with your changes.

License

This project is released under the MIT License.

1.0.0

6 months ago