JAVA DES 在windows正常 liunx下抛javax.crypto.BadPaddingException: Given final block 各位兄弟帮帮忙!如题,我在windows下访问liunx下的应用。解密抛javax.crypto.BadPaddingException: Given final block not properly padded异常.请问是何原因啊。困扰好几天了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private byte[] getDesCode(byte[] byteD) { Cipher cipher; byte[] byteFina = null; try { cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, key); byteFina = cipher.doFinal(byteD); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException (" getDesCode Exception :" + e.getMessage()); } finally { cipher = null; } return byteFina; } 如何双击打开运行jar文件 在synchronized块中声明变量!! 从键盘输入一个数,然后求其平方用Java怎么写 初学java 一个问题 字符串问题 很简单的一小段javascript,立马揭帖 写一个方法,构造一个可以存储10000个对象的哈希表,当这个哈希表容量已满时,找到其中最不常用的对象删除,并添加一个新的对象,条件是 如何将表头放到左边? 哪里可以下载JCreate? 一个用JBuilder生成jar的问题? odbc连接不上的问题 IBMRational测试软件 多少钱?
Cipher cipher;
byte[] byteFina = null;
try {
cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, key);
byteFina = cipher.doFinal(byteD);
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException (" getDesCode Exception :" + e.getMessage());
} finally {
cipher = null;
}
return byteFina; }