Here you can find the source of xorDecode(String data, String key)
public static String xorDecode(String data, String key)
//package com.java2s; //License from project: Open Source License public class Main { public static String xorDecode(String data, String key) { byte m_cData[] = data.getBytes(); byte m_cKey[] = key.getBytes(); int keyPointer = 0; byte keyPointerAdd = 0; for (int i = 0; i < m_cData.length; i++) { keyPointerAdd = m_cData[i];/* ww w . ja v a 2 s . co m*/ m_cData[i] ^= m_cKey[keyPointer]; keyPointer += keyPointerAdd; keyPointer %= m_cKey.length; } return new String(m_cData); } }