aakashchipher
v1.0.6
Published
This package helps to encode or decode text with the help of secret key
Downloads
10
Maintainers
Readme
AakashCipher
A simple module to encode and decode messages with a secret key.
Features
- Simple to use: Encode and decode messages with ease.
- Secure: Utilizes a secret key for encoding and decoding.
- Flexible: Supports any length of input messages.
Table of Contents
Installation
Install the package using npm:
npm install aakashcipher
Usage Encoding a Message
const { encodeMessage } = require('aakashchipher');
const data = "hello aakash";
const secretKey = "Secret123";
try {
const encodedData = encodeMessage(data, secretKey);
console.log(encodedData); // Encoded message
} catch (error) {
console.error(error.message);
}
Decoding a Message
const { decodeMessage } = require('aakashchipher');
const encodedData = "your_encoded_message_here";
const secretKey = "Secret123";
try {
const decodedData = decodeMessage(encodedData, secretKey);
console.log(decodedData); // Decoded message
} catch (error) {
console.error(error.message);
}
API encodeMessage
encodeMessage(data, secretKey)
data: string - The message to encode. secretKey: string - The secret key used for encoding. Returns: string - The encoded message.
decodeMessage
decodeMessage(encodedData, secretKey)
encodedData: string - The message to decode. secretKey: string - The secret key used for decoding. Returns: string - The decoded message.
Contributing Contributions are welcome! Please open an issue or submit a pull request.
License This project is licensed under the ISC License.
Links
GitHub Repository
Issue Tracker