怎样对纯数字进行des算法加密结果依然得到纯数字 有10位的数字和21位数字,用des算法把21位数字作key对10位数字进行加密,最后得到新的10位数字,怎样用java实现?算法加密Java 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 问题解决了,代码贴上private static String getDigit(String shiftNum, String key) throws NoSuchAlgorithmException { char cs[] = {'0','1','2','3','4','5','6','7','8','9'}; byte temp[] = encrypt(shiftNum, key).getBytes(); char c[] = new char[4]; for(int i=0; i<4; i++) { c[i] = cs[temp[i]%10]; } return new String(c); } 求助呀 小弟刚开始学java 这段代码哪里有问题呀 JAVA字节与字符的问题 可不可以在一个JFrame中显示两个窗口 我学。net4年了想转java还来得及吗?如果转需要学什么? JAVA的文件类中,什么字符串代表根目录 出错问题:需要 ".class" 求JSWDK1.0.1 急:文件路径问题 求教求差影图的概念 请问java的io包中各种Reader类和原先的Stream类有什么区别 如何判断Map<String, Object>为空? 在swing上画图的问题
private static String getDigit(String shiftNum, String key)
throws NoSuchAlgorithmException {
char cs[] = {'0','1','2','3','4','5','6','7','8','9'};
byte temp[] = encrypt(shiftNum, key).getBytes();
char c[] = new char[4];
for(int i=0; i<4; i++) {
c[i] = cs[temp[i]%10];
}
return new String(c);
}