code: public static byte[] encryptByPrivateKey(byte[] data, String privateKey) throws Exception {
          String keyBytes = Base64Utils.decode(privateKey);
          PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes.getBytes());
          KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
          Key privateK = keyFactory.generatePrivate(pkcs8KeySpec);
          Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
          cipher.init(Cipher.ENCRYPT_MODE, privateK);
          int inputLen = data.length;
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          int offSet = 0;
          byte[] cache;
          int i = 0;
          // 对数据分段加密
          setData(data, cipher, inputLen, out, offSet, i);
  
          byte[] encryptedData = out.toByteArray();
          out.close();
          return encryptedData;
      }
docs: <p>
  私钥加密
  </p>
  
  @param data 源数据
  @param privateKey 私钥(BASE64编码)
  @return
  @throws Exception