Encrypt/Decrypt now work correctly.

Updated the code, both encrypt and decrypt now work.  Decryption detects
replay attacaks, as well as any data corruption that may occur, and will
exit before attempting to decrypt any data.