Java Utililty Methods String XOR Encode

List of utility methods to do String XOR Encode

Description

The list of methods to do String XOR Encode are organized into topic(s).

Method

StringxorEncode(String data, String key)
xor Encode
byte m_cData[] = data.getBytes();
byte m_cKey[] = key.getBytes();
int keyPointer = 0;
for (int i = 0; i < m_cData.length; i++) {
    m_cData[i] ^= m_cKey[keyPointer];
    keyPointer += m_cData[i];
    keyPointer %= m_cKey.length;
return new String(m_cData);
StringXORencode(String res, String key)
XO Rencode
byte[] bs = res.getBytes();
for (int i = 0; i < bs.length; i++) {
    bs[i] = (byte) ((bs[i]) ^ key.hashCode());
return parseByte2HexStr(bs);