Here you can find the source of encrypt(String str)
public static String encrypt(String str)
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public static String encrypt(String str) { String key = "a12348a9gde"; StringBuilder sb = new StringBuilder(); try {//from ww w.ja va2 s . c om byte[] data = str.getBytes("UTF-8"); byte[] keyData = key.getBytes("UTF-8"); for (int i = 0; i < data.length; i++) { String s = String.format("%02X", data[i] & 0xFF ^ keyData[i % keyData.length] & 0xFF); sb.append(s); } } catch (UnsupportedEncodingException e) { } catch (Exception e) { } return sb.toString(); } }