Here you can find the source of xor(String key, String input)
public static String xor(String key, String input)
//package com.java2s; //License from project: Apache License public class Main { /**/*from www . j a v a 2 s. c o m*/ * Simple XOR encryption * @see <a href="https://github.com/KyleBanks/XOREncryption/blob/master/Java%20(Android%20compatible)/XOREncryption.java">Sources on GitHub</a> */ public static String xor(String key, String input) { StringBuilder output = new StringBuilder(); for (int i = 0; i < input.length(); i++) { output.append((char) (input.charAt(i) ^ key.charAt(i % key.length()))); } return output.toString(); } }