We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8605b9 commit ed99f58Copy full SHA for ed99f58
ciphers/Caesar.java
@@ -24,9 +24,9 @@ public class Caesar {
24
public static String encode(String message, int shift) {
25
String encoded = "";
26
27
- if (shift >= 26) { // 26 = number of latin letters
28
- shift %= 26;
29
- }
+
+ shift %= 26;
30
31
final int length = message.length();
32
for (int i = 0; i < length; i++) {
@@ -62,9 +62,9 @@ public static String encode(String message, int shift) {
62
public static String decode(String encryptedMessage, int shift) {
63
String decoded = "";
64
65
66
67
68
69
final int length = encryptedMessage.length();
70
0 commit comments