Java tutorial
//package com.java2s; //License from project: LGPL public class Main { public static String decrypt(String key, String value) { String result = null; //result = value result = new String(decodeBase64(value)); result = (key != null && result.startsWith(key) ? result.substring(key.length()) : result); return result; } protected static byte[] decodeBase64(String value) { byte[] result = null; byte[] binaryData = value.getBytes(); result = org.apache.commons.codec.binary.Base64.decodeBase64(binaryData); // return value.decodeBase64(); return result; } }