code: public static byte[] decryptByPublicKey(byte[] encryptedData, String publicKey) throws Exception {
          String keyBytes = Base64Utils.decode(publicKey);
          X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(keyBytes.getBytes());
          KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
          Key publicK = keyFactory.generatePublic(x509KeySpec);
          Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
          cipher.init(Cipher.DECRYPT_MODE, publicK);
          int inputLen = encryptedData.length;
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          int offSet = 0;
          int i = 0;
          setData(encryptedData, cipher, inputLen, out, offSet, i);
  
          byte[] decryptedData = out.toByteArray();
          out.close();
          return decryptedData;
      }
docs: <p>
  公钥解密
  </p>
  
  @param encryptedData 已加密数据
  @param publicKey 公钥(BASE64编码)
  @return
  @throws Exception