| 74 | } |
| 75 | /* Driver Code */ |
| 76 | public static void main(String[] args) |
| 77 | { |
| 78 | /* Message to be encrypted. */ |
| 79 | String originalval = "AES Encryption"; |
| 80 | /* Call the encrypt() method and store result of encryption. */ |
| 81 | String encryptedval = encrypt(originalval); |
| 82 | /* Call the decrypt() method and store result of decryption. */ |
| 83 | String decryptedval = decrypt(encryptedval); |
| 84 | /* Display the original message, encrypted message and decrypted message on the console. */ |
| 85 | System.out.println("Original value: " + originalval); |
| 86 | System.out.println("Encrypted value: " + encryptedval); |
| 87 | System.out.println("Decrypted value: " + decryptedval); |
| 88 | } |
| 89 | } |