Text Encryption App: Secure Your Messages with AES

Category: Javascript , Text | December 31, 2024
AuthorIqbolshoh
Last UpdateDecember 31, 2024
LicenseMIT
Tags
Views108 views
Text Encryption App: Secure Your Messages with AES

This web application provides a simple way to encrypt and decrypt text using the robust AES encryption standard.

Built with HTML, CSS, and JavaScript, it offers a user-friendly interface for enhancing the privacy of your messages.

You can easily encrypt any text, decrypt it back to its original form, and conveniently copy either version to your clipboard.

How to use it:

1. Enter or paste the text you want to encrypt into the first text area. The encrypted version of your text will instantly populate the second text area.

Text Encryption

2. Paste the encrypted text into the second text area, and the original, decrypted text will automatically appear in the first text area.

3. Click the copy icon next to either text area to copy its contents.

How It Works:

The app uses the AES (Advanced Encryption Standard) algorithm from the CryptoJS library.

encrypt(text):

  • Takes the input text and encrypts it using AES.
  • Uses “Iqbolshoh_777” as the encryption key.
  • Returns the encrypted text as a string.

decrypt(encryptedText):

  • Takes encrypted text and decrypts it using the same key.
  • Returns the original text in UTF-8 encoding.

processText(n):

  • Handles the encryption/decryption process.
  • If n is 1, it encrypts the text from the first textarea.
  • If n is not 1, it decrypts the text from the second textarea.

copyText(n):

  • Copies text from the selected textarea to the clipboard.
  • Uses the execCommand(“copy”) method after selecting the text.

The app continuously updates the encrypted or decrypted text as the user types, providing real-time feedback.

Changelog:

12/31/2024

  • Update

You Might Be Interested In:


Leave a Reply