Skip to content

It's an application that encrypts texts, so you can exchange secret messages with other people who know the secret of the encryption used.

License

Notifications You must be signed in to change notification settings

Jonnata/challengeonedecodificador4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Text Decoder STATUS DONE Website

It's an application that encrypts texts, so you can exchange secret messages with other people who know the secret of the encryption used.

Stacks used

html5 logo css3 logo javascript logo

Overview

Text Decoder - Alura Challenges Oracle ONE

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:

"gato" => "gaitober"

gaitober" => "gato"

  • 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.

Functionalities

  • Dark and light themes
  • Encrypt text button
  • Decrypt text button
  • Copy button
  • Clear button

Screenshots

Light Mode

light theme

Dark Mode

dark theme

What I Learned

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;
    }
}

Author

Jonnata Costa

Linkedin Badge

Made with ❤️ by Jonnata Costa 👋🏽 Get in touch!

MIT License

About

It's an application that encrypts texts, so you can exchange secret messages with other people who know the secret of the encryption used.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published