testcase for encrypt/decrypt