encryption.tools
v1.0.0
Published
A simple encryption and decryption tool using double Base64 encoding.
Readme
encryption.tools
A simple Node.js module for basic encryption and decryption using a double Base64 encoding method.
Installation
To use this module in your project, you can install it via npm:
npm install encryption.toolsUsage
Here is a basic example of how to use the encryption and dencryption functions.
const encryptionTools = require('encryption.tools');
const myText = "Hello World!";
// Encrypt the text
const encrypted = encryptionTools.encryption(myText);
console.log('Encrypted:', encrypted); // The output will be a long string of random-looking hex characters, e.g., '8d6b...'
// Decrypt the text
const decrypted = encryptionTools.dencryption(encrypted);
console.log('Decrypted:', decrypted); // Hello World!API
encryption(text)
Encrypts the input string.
text(string): The text to be encrypted.- Returns: The encrypted string.
dencryption(encryptedText)
Decrypts the input string.
encryptedText(string): The encrypted text to be decrypted.- Returns: The original string.
How to Run the Example
To run the example file and see the module in action, run the following command from the root of the project directory:
npm test