微信退款拋錯javax.crypto.BadPaddingException: Given final block not properly padded

 

  我是java後臺,微信退款的時候 遇到這個問題 檢查發現是加載證書的時候密碼錯誤造成的。

      KeyStore keyStore  = KeyStore.getInstance("PKCS12");
      //certPath 證書所在路徑
	  File file = new File(certPath);
	  FileInputStream instream = new FileInputStream(file);
	  try 
          {
	           keyStore.load(instream, mchId.toCharArray());//密碼默認是商戶號
	      } finally
          {
	           instream.close();
	      }

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章