added the tests for affine.py and fixed decryption