Added the decryption code along with some basic tests.