projectsupport-gdczismx

1.0.0 • Public • Published

USAGE

const readline = require('readline');
const { encryptMessage, decryptMessage } = require('zentea');

const prompt = (query) => new Promise((resolve) => {
    const rl = readline.createInterface({
        input: process.stdin,
        output: process.stdout
    });
    rl.question(query, (response) => {
        rl.close();
        resolve(response);
    });
});

const secureMessage = async () => {
    const message = await prompt('Greetings! Please share your message: ');
    const key = await prompt('To protect your message, enter a secret key: ');

    const encrypted = encryptMessage(message, key);
    console.log('Your message is now securely encoded:', encrypted);

    const decrypted = decryptMessage(encrypted, key);
    console.log('Unlocking... Your original message is:', decrypted);
};

secureMessage();

THANKS

Dependencies (8)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i projectsupport-gdczismx

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.06 kB

    Total Files

    3

    Last publish

    Collaborators

    • zenuar