It's an application that encrypts texts, so you can exchange secret messages with other people who know the secret of the encryption used.
The encryption "keys" I used are:
- The letter "e" is converted to "enter"
- The letter "i" is converted to "imes"
- The letter "a" is converted to "ai"
- The letter "o" is converted to "ober"
- The letter "u" is converted to "ufat"
Requirements:
- Should only work with lowercase letters
- Letters with accents or special characters must not be used
- It must be possible to convert a word to the encrypted version and also return an encrypted word to the original version.
For example:
- The page has fields for entering the text to be encrypted or decrypted, and the user can choose between the two options
- The result is displayed on the screen.
- Dark and light themes
- Encrypt text
button
- Decrypt text
button
- Copy
button
- Clear
button
Blocking decoding with Uppercase words and with a direct accent in the input: onkeyup="this.value = this.value.toLowerCase();" causes decryption not to work. I learned to solve this problem by creating a function using Regex.:
function checkTextParameters(text){
if(text === text.toLowerCase()){
const textChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/;
return !(textChars.test(text))
}
else{
return false;
}
}
Made with ❤️ by Jonnata Costa 👋🏽 Get in touch!