F Lucas wrote:Export all the formatting code to a separate method
Make the method symmetric, and make it accept a parameter to change between encryption mode and decryption mode
Polish the code more
And print out the Key, salt, and ciphertext in Base64 for debug purposes
I use excessive amounts of comments on my code because it helps me remember basic code. But it probably reduces readability, so I will omit it next time.
F Lucas wrote:FIX: I had to extract the authentication tag (16 bytes in the end of the ciphertext) and use .doFinal
with it as parameter to make it verify the tag.