Package Exports
- cipher-guard
- cipher-guard/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cipher-guard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Cipher Guard
Cipher Guard is a lightweight encryption and decryption library providing Caesar and XOR ciphers with Base64 encoding for added security. This package is designed to offer a simple and versatile solution for securing text-based data.
Installation
Install the package using npm:
npm install cipher-guardUsage
const { encrypt, decrypt } = require("cipher-guard");
const encryptionKey = 24;
const salt = "abcd";
// Encryption
const encryptedText = encrypt("Hello World!", encryptionKey, salt);
console.log(encryptedText); // IgIEAwt5MQ4MBTx4PT89Ow==
// Decryption
const decryptedText = decrypt(encryptedText, encryptionKey, salt);
console.log(decryptedText); // Hello World!Functions
encrypt(text, key, salt)
- text : string
- key : number (0 - 127)
- salt : string
Returns an encrypted string.
decrypt(text, key, salt)
- text : string
- key : number (0 - 127)
- salt : string
Returns a decrypted string.