关于加密还原问题,急待!!!
public static String encrypt(String password)
{
char c1[] = password.toCharArray();
for (int i = 0; i < password.length(); i++)
{
c1[i] = (char) (i + c1[i]);
}
return new String(c1);
}
public static void main(String[] args) {
System.out.println(encrypt("opet123456"));
// 输出为:oqgw579;=?
}
现在我想写个函数,传入"oqgw579;=?" 输出为:opet123456
请大侠们帮我看看。写个函数。谢谢