Hello
i write program for encryption with use pasword. In some cases (pasword its word like belgija program dont decryption normal, if i use another vord or i spell it and use letther word belgija i get normal result ) where its mistake?
//code for encryption String znakm kljuc2, beseda3; char znak2; int aaa; kljuc2 = beseda3; aaa = kljuc2.length(); for (int stevec = 0; stevec < aaa; stevec++){ znak2 = kljuc2.charAt(stevec); znak = Character.toString(znak2); switch (znak){ case "1" : case "q" : case "w" : case "v" : case "b" : case "2" : case "!" : case "e" : case "c" : case "n" : case "S" : case "D" : case "Z" : case "T" : case "Ł": case "ł": spirala(); break; case "3": case "#" : case "r" : case "m" : case "," : case "4" : case "$" : case "t" : case "x" : case "." : case "A" : case "F" : case "U" : case "R" : case "ß": case "@": gordoll(); break; case "5": case "%" : case "z" : case "y" : case "-" : case "6" : case "&" : case "u" : case "<" : case "_" : case ">" : case "G" : case "I" : case "E" : case "¤": gordol(); break; case "7": case "/" : case "i" : case "a" : case ":" : case "8" : case "(" : case "o" : case "s" : case ";" : case "Y" : case "H" : case "O" : case "W" : case "×": doll(); break; case "9": case ")" : case "p" : case "d" : case "M" : case "0" : case "=" : case "l" : case "f" : case "N" : case "X" : case "J" : case "P" : case "Q" : case "÷": gor(); break; case "'": case "?" : case "k" : case "g" : case "B" : case "+" : case "*" : case "j" : case "h" : case "V" : case "C" : case "K" : case "L" : case "|": case "€" : dol(); break; } } //code for decryption String znakm kljuc2, beseda3; char znak2; int aaa; aaa = kljuc2.length(); for (int stevec = 0; stevec < aaa; stevec++){ znak2 = kljuc2.charAt(stevec); znak = Character.toString(znak2); switch (znak){ case "1" : case "q" : case "w" : case "v" : case "b" : case "2" : case "!" : case "e" : case "c" : case "n" : case "S" : case "D" : case "Z" : case "T" : case "Ł": case "ł": spirala2(); break; case "3": case "#" : case "r" : case "m" : case "," : case "4" : case "$" : case "t" : case "x" : case "." : case "A" : case "F" : case "U" : case "R" : case "ß": case "@": gordoll2(); break; case "5": case "%" : case "z" : case "y" : case "-" : case "6" : case "&" : case "u" : case "<" : case "_" : case ">" : case "G" : case "I" : case "E" : case "¤": gordol2(); break; case "7": case "/" : case "i" : case "a" : case ":" : case "8" : case "(" : case "o" : case "s" : case ";" : case "Y" : case "H" : case "O" : case "W" : case "×": doll2(); break; case "9": case ")" : case "p" : case "d" : case "M" : case "0" : case "=" : case "l" : case "f" : case "N" : case "X" : case "J" : case "P" : case "Q" : case "÷": gor2(); break; case "'": case "?" : case "k" : case "g" : case "B" : case "+" : case "*" : case "j" : case "h" : case "V" : case "C" : case "K" : case "L" : case "|": case "€" : dol2(); break; } }