Skip to content

Commit

Permalink
Added function
Browse files Browse the repository at this point in the history
  • Loading branch information
fellipecouto committed Jun 28, 2023
1 parent 3d338fb commit d9a5ebd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CipherCode.cpp
Expand Up @@ -135,4 +135,4 @@ String reverseStr(String txt) {
String txtReverse = "";
for (int i = txt.length() - 1; i >= 0; i--) txtReverse += txt.substring(i, i + 1);
return txtReverse;
}
}
Expand Up @@ -34,11 +34,11 @@ void loop() {
txt = strSerial;
Serial.println("--> " + txt);
Serial.println("\nSelect the cipher type:");
Serial.println("1=CeasarCipher 2=VigenereCipher 3=MathCipher 4=MirrorCipher 5=Hacker 6= MSN 7=Reverse");
Serial.println("1=CeasarCipher 2=VigenereCipher 3=MathCipher 4=MirrorCipher 5=Hacker 6=MSN 7=Reverse");
menu = 2;
} else if (menu == 2) {
typeCipher = strSerial.toInt();
if (typeCipher > 6) typeCipher = 6;
if (typeCipher > 7) typeCipher = 7;
Serial.println("--> " + String(typeCipher));
Serial.println("\nSelect the option:");
Serial.println("1=Encode 2=Decode");
Expand Down Expand Up @@ -77,7 +77,7 @@ void loop() {
case 6:
Serial.println("--> " + msnStr(txt, code));
break;
case 7:
case 7:
Serial.println("--> " + reverseStr(txt));
break;
default:
Expand All @@ -93,4 +93,4 @@ void loop() {
Serial.println("\nEnter text to encode:");
menu = 1;
}
}
}
2 changes: 1 addition & 1 deletion library.properties
@@ -1,5 +1,5 @@
name=CipherCode
version=1.1.0
version=1.1.2
author=Fellipe Couto <fellipe.couto@yahoo.com.br>
maintainer=Fellipe Couto <fellipe.couto@yahoo.com.br>
sentence=Library with functions to encode texts
Expand Down

0 comments on commit d9a5ebd

Please sign in to comment.