Signed-off-by: Francesco Mancuso <hello@francescomancuso.it>
This commit is contained in:
@@ -22,7 +22,10 @@ public class Caesar {
|
|||||||
for(int key = 0; key < alphabet.length(); key++){
|
for(int key = 0; key < alphabet.length(); key++){
|
||||||
|
|
||||||
for(int i = 0; i < ciphertext.length(); i++){
|
for(int i = 0; i < ciphertext.length(); i++){
|
||||||
if (encoded[i] == ' ') continue;
|
if (encoded[i] == ' ') {
|
||||||
|
decoded[i] = encoded[i];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
char current = encoded[i];
|
char current = encoded[i];
|
||||||
int pos = alphabet.indexOf(current);
|
int pos = alphabet.indexOf(current);
|
||||||
if(pos != -1) {
|
if(pos != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user