TestSfsSign.java 597 B

12345678910111213141516171819
  1. import cn.start.tz.module.pressure.util.SignP7;
  2. import org.apache.rocketmq.client.exception.MQClientException;
  3. import org.junit.Test;
  4. public class TestSfsSign {
  5. @Test
  6. public void testSign() {
  7. try {
  8. String pfxFile = "classpath:SFS.pfx";//省非税证书文件
  9. String pwd = "661209";//661209 123456
  10. String orgData = "1234567890";
  11. String signValue = SignP7.p7Sign(pfxFile, orgData.getBytes("GBK"), pwd);
  12. System.out.println(signValue);
  13. } catch (Exception e) {
  14. e.printStackTrace();
  15. }
  16. }
  17. }