fixed encrypting/decrypting and added tests