refine xor cipher for paas