Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static String authEncode(String src) { if (TextUtils.isEmpty(src)) { throw new NullPointerException(); } byte[] buf = src.getBytes(); for (int i = 0; i < buf.length; i++) { buf[i] ^= (i + 0x40); } return new String(buf); } }