微信退款抛错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();
	      }

 

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