(String[] args)
| 4 | |
| 5 | public class CeaserCipher { |
| 6 | public static void main(String[] args) { |
| 7 | System.out.println(""" |
| 8 | -------------------------------- |
| 9 | CEASER CIPHER ENCRYPT/ DECRYPT |
| 10 | -------------------------------- |
| 11 | """); |
| 12 | Scanner sc = new Scanner(System.in); |
| 13 | System.out.println("Encrypt or Decrypt:\n 1- Encryption\n 2- Decryption"); |
| 14 | int type = sc.nextInt(); |
| 15 | for (int j = 1; j > 0; j++) { |
| 16 | if (type == 1) { |
| 17 | ceaserCipherEncryption(); |
| 18 | break; |
| 19 | } else if (type == 2) { |
| 20 | ceaserCipherDecryption(); |
| 21 | break; |
| 22 | } else { |
| 23 | System.out.print("Please enter a valid number (1 or 2): "); |
| 24 | type = sc.nextInt(); |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | public static void ceaserCipherEncryption() { |
| 29 | Scanner textInput = new Scanner(System.in); |
| 30 | System.out.print("PlainText: "); |
nothing calls this directly
no test coverage detected