Here you can find the source of EncryptDecrypt(String value)
public static String EncryptDecrypt(String value)
//package com.java2s; /**/*from www.j a v a 2 s . c o m*/ * * Copyright (c) 2015 Fannie Mae, All rights reserved. * This program and the accompany materials are made available under * the terms of the Fannie Mae Open Source Licensing Project available * at https://github.com/FannieMaeOpenSource/ezPie/wiki/License * * ezPIE? is a registered trademark of Fannie Mae * */ public class Main { public static String EncryptDecrypt(String value) { byte[] aCrypt = { 0x34 }; byte[] aInput = value.getBytes(); int iLength = aInput.length; byte[] aOutput = new byte[iLength]; for (int pos = 0; pos < iLength; ++pos) { aOutput[pos] = (byte) (aInput[pos] ^ aCrypt[0]); } return new String(aOutput); } public static String EncryptDecrypt(String value, String key) { byte[] aCrypt = key.getBytes(); byte[] aInput = value.getBytes(); int iLength = aInput.length; int iKeyLength = aCrypt.length; byte[] aOutput = new byte[iLength]; int ikeypos = 0; for (int pos = 0; pos < iLength; ++pos) { aOutput[pos] = (byte) (aInput[pos] ^ aCrypt[ikeypos]); ikeypos++; if (ikeypos >= iKeyLength) { ikeypos = 0; } } return new String(aOutput); } }