类 RSAUtils

java.lang.Object
net.jlxxw.wechat.event.util.RSAUtils

public class RSAUtils extends Object
RSA加密解密
作者:
chunyang.leng
  • 构造器详细资料

    • RSAUtils

      public RSAUtils()
  • 方法详细资料

    • encode

      public static String encode(String src, String publicKey) throws Exception
      加密
      参数:
      src - 原始字符串
      publicKey - 公钥
      返回:
      加密后的字符串
      抛出:
      Exception
    • decode

      public static String decode(String src, String privateKey) throws Exception
      解密
      参数:
      src - 原始字符串
      privateKey - 私钥
      返回:
      加密后的字符串
      抛出:
      Exception