Skip to content

Commit 075a1d0

Browse files
committed
removes commented out code
1 parent 0aa41a8 commit 075a1d0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/main/java/com/cryptoexamples/java/ExampleFileEncryptionInOneMethod.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ public static void main(String[] args) {
5656
GCMParameterSpec spec = new GCMParameterSpec(16 * 8, nonce);
5757
cipher.init(Cipher.ENCRYPT_MODE, key, spec);
5858

59-
//byte[] aad = "Additional authenticated not encrypted data".getBytes();
60-
//cipher.updateAAD(aad);
61-
6259
// TODO store encryption parameters as authenticated data prepended to the file content
6360

6461
// SET UP OUTPUT STREAM and write content of String
@@ -76,7 +73,7 @@ public static void main(String[] args) {
7673
// READ ENCRYPTED FILE
7774
StringBuilder stringBuilder = new StringBuilder();
7875
cipher.init(Cipher.DECRYPT_MODE, key, spec);
79-
//cipher.updateAAD(aad);
76+
8077
try (
8178
FileInputStream fileInputStream = new FileInputStream("encryptedFile.enc");
8279
CipherInputStream cipherInputStream = new CipherInputStream(fileInputStream, cipher)

0 commit comments

Comments
 (0)