Here you can find the source of Encrypt(String str)
public static String Encrypt(String str)
//package com.java2s; //License from project: Apache License public class Main { public static String Encrypt(String str) { return Str2Unicode(encryStr("IBMExtract", str)); }/*from w ww. j av a 2 s.com*/ private static String Str2Unicode(String str) { String result = ""; char[] chars = str.toCharArray(); for (int i = 0; i < chars.length; i++) { String hexa = Long.toHexString(chars[i]).toUpperCase(); result = result + new StringBuilder().append("0000").append(hexa) .toString() .substring(hexa.length(), hexa.length() + 4); } return result; } private static String encryStr(String encKey, String toEnc) { int t = 0; int encKeyI = 0; while (t < encKey.length()) { encKeyI += encKey.charAt(t); t++; } return encry(encKeyI, toEnc); } private static String encry(int encKey, String toEnc) { int t = 0; String tog = ""; if (encKey > 0) { while (t < toEnc.length()) { int a = toEnc.charAt(t); int c = a ^ encKey; char d = (char) c; tog = tog + d; t++; } } return tog; } }