A very strong encoder/decoder website!

Project URL: https://strongest-encoders-and-decoders.glitch.me/

Choose one of the available encoder/decoders & encode text very efficiently

Please let me know if there is anything wrong or if you have any suggestions!
This WILL BE updated VERY OFTEN! so please be sure to check back!

1 Like

Is it possible for you to add stronger ones? The ones added (tried max sec 2) are very basic and can be bypassed by any amateur interested in this stuff.

1 Like

I will add stronger ones eventually this is just the start of it.

PSA: Don’t use this. These are not “strong”: Anyone that knows the algorithm being used will be able to easily crack the encoded text.

You should instead use AES encryption (like AES-256-CBC) with a secure passphrase.

You can do it like this in node:

const crypto = require('crypto');

function encrypt(text, passphrase) {
    const iv = crypto.randomBytes(16);
    const cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(passphrase, 'utf-8'), iv);
    let encrypted = cipher.update(text, 'utf-8', 'hex');
    encrypted += cipher.final('hex');
    return iv.toString('hex') + ':' + encrypted;
}

function decrypt(encryptedText, passphrase) {
    const [ivHex, encrypted] = encryptedText.split(':');
    const iv = Buffer.from(ivHex, 'hex');
    const decipher = crypto.createDecipheriv('aes-256-cbc', Buffer.from(passphrase, 'utf-8'), iv);
    let decrypted = decipher.update(encrypted, 'hex', 'utf-8');
    decrypted += decipher.final('utf-8');
    return decrypted;
}

// Example
const passphrase = 'my_secret_passphrase';
const text = 'hii!';
const encrypted = encrypt(text, passphrase);
const decrypted = decrypt(encrypted, passphrase);

console.log('Encrypted:', encrypted);
console.log('Decrypted:', decrypted);

In the browser:

async function encrypt(text, passphrase) {
    const encoder = new TextEncoder();
    const data = encoder.encode(text);
    const key = await crypto.subtle.importKey(
        "raw",
        encoder.encode(passphrase),
        { name: "AES-GCM", length: 256 },
        false,
        ["encrypt", "decrypt"]
    );

    const iv = crypto.getRandomValues(new Uint8Array(12));
    const encryptedData = await crypto.subtle.encrypt(
        { name: "AES-GCM", iv },
        key,
        data
    );

    return {
        iv: Array.from(iv),
        encryptedData: Array.from(new Uint8Array(encryptedData))
    };
}

async function decrypt(encryptedObj, passphrase) {
    const decoder = new TextDecoder();
    const key = await crypto.subtle.importKey(
        "raw",
        new TextEncoder().encode(passphrase),
        { name: "AES-GCM", length: 256 },
        false,
        ["encrypt", "decrypt"]
    );

    const iv = new Uint8Array(encryptedObj.iv);
    const encryptedData = new Uint8Array(encryptedObj.encryptedData);

    const decryptedData = await crypto.subtle.decrypt(
        { name: "AES-GCM", iv },
        key,
        encryptedData
    );

    return decoder.decode(decryptedData);
}

// example
const passphrase = 'my_secret_passphrase';
const text = 'hii!';

encrypt(text, passphrase).then(encrypted => {
    console.log('Encrypted:', encrypted);
    decrypt(encrypted, passphrase).then(decrypted => {
        console.log('Decrypted:', decrypted);
    });
});
1 Like

I have added a new “max security” encoder. it now encrypts “hi” into “eyJpdiI6WzE5NiwzLDE0OCwyNDAsMTczLDE5NywyMTgsMTIzLDQxLDEwNSwxMjEsMjZdLCJlbmNyeXB0ZWREYXRhIjpbOTksMTMwLDQ1LDIwOSwyMTgsMjAyLDE4OCw2MSw4OSw3Niw4Myw4NSw1NywxNjQsMTE4LDExNywyNTMsNjgsMjQ4LDM0XX0=” you can try it out yourself :slight_smile: i hope this is better

I added a new “max sec” enocder. you can try it out yourself :slight_smile: also @tiago @aijsijsaijsijsa thanks for the feedback it helps a lot :smile:

:pensive:
image

i do recommend learning about the technology instead of chatgpting everything, theres only so much it can generate

1 Like

there’s also usually some more logic between a “passphrase” and an AES key

yeah, I left out salting and such since I don’t think they would add much context here.

you should allow users to set a custom passphrase :slight_smile:

2 Likes

ik quite a bit but there are certain things I still don’t know. I had to teach myself js because I couldn’t find a good courses forfree (e.g I had to use codecademy’s cheatsheet for js to teach myself)

1 Like

here are some helpful resources:

1 Like

thanks for these. ill check them out :slight_smile:

2 Likes