The following code works but I am trying to prevent decrypting a file if you have the wrong key.


// Example code showing how to use Java's Password-Based encryption. This
// example is a...