diff --git a/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesDecrypter.java b/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesDecrypter.java index 05164b6..7ffde96 100644 --- a/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesDecrypter.java +++ b/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesDecrypter.java @@ -25,7 +25,6 @@ public DefaultAesDecrypter(SecureRandom secureRandom) { public String decrypt(SecretKey secretKey, byte[] initializationVectorAndCipherText) { try { - // TODO this doesn't look reentrant var cipher = Cipher.getInstance(CIPHER_ALGORITHM); cipher.init(DECRYPT_MODE, secretKey, new IvParameterSpec(initializationVectorAndCipherText, 0, INITIALIZATION_VECTOR_LENGTH), secureRandom); return new String(cipher.doFinal(initializationVectorAndCipherText, INITIALIZATION_VECTOR_LENGTH, initializationVectorAndCipherText.length - INITIALIZATION_VECTOR_LENGTH)); diff --git a/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesEncrypter.java b/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesEncrypter.java index 2e5af34..ac85eb2 100644 --- a/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesEncrypter.java +++ b/src/main/java/engineering/everest/starterkit/axon/cryptoshredding/encryption/DefaultAesEncrypter.java @@ -26,7 +26,6 @@ public DefaultAesEncrypter(SecureRandom secureRandom) { public byte[] encrypt(SecretKey secretKey, String cleartext) { try { - // TODO this doesn't look reentrant var cipher = Cipher.getInstance(CIPHER_ALGORITHM); byte[] initializationVector = createInitializationVector(); cipher.init(ENCRYPT_MODE, secretKey, new IvParameterSpec(initializationVector), secureRandom);