xor encryption decryption JavaScript functions