Examples of decryptByPublicKey()


Examples of com.bj58.spat.gaea.server.secure.RSAHelper.decryptByPublicKey()

  @Test
  public void testDecryptByPubKey() throws Exception {
    RSAHelper helper = RSAHelper.getInstance();
    byte[] destBuf = helper.encryptByPrivateKey(src.getBytes("utf-8"));
    byte[] srcBuf = helper.decryptByPublicKey(destBuf);
    Assert.assertEquals(src, new String(srcBuf, "utf-8"));
  }

  @Test
  public void testDecryptByPriKey() throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.