Fix bug for XOREncrypt