add test cases for encrypt and decrypt