Finished encryption and decryption functions and associated tests.