Exception in thread "main" javax.crypto.BadPaddingException: Given final block not properly padded

java des加密是直接用des会报错:Exception in thread "main" javax.crypto.BadPaddingException: Given final block not properly paddedjava

 

找了半天,只能改用另外一个方式,至于两种方式的区别,就本身去官方看api了www.twitterchina.netapi

//Exception in thread "main" javax.crypto.BadPaddingException: Given final block not properly padded
//  Cipher cipher=Cipher.getInstance("DES");
 Cipher cipher = Cipher.getInstance("DES/ECB/NoPadding");加密

来源:www.javait.org.net

相关文章
相关标签/搜索