示例#1
0
 @Test
 public void verify() throws Exception {
   String signStr = privateKeySign.sign(Constants.source, Constants.charset);
   System.out.println("签名:" + signStr);
   boolean verifyFlag = publicKeyVerify.verify(Constants.source, Constants.charset, signStr);
   System.out.println("验签结果:" + verifyFlag);
   Assert.assertEquals(true, verifyFlag);
 }
示例#2
0
 @Test
 public void sign() throws Exception {
   String signStr = privateKeySign.sign(Constants.source, Constants.charset);
   Assert.assertNotNull(signStr);
   System.out.println("签名:" + signStr);
 }