code: private static SignatureHolder buildSignatureHolder(String privateKey, String publicKey,
                                                          Algorithms algorithms) {
          log.debug("构建SignatureHolder");
          try {
              log.debug("构建公钥以及验签器");
              RSAPublicKey pubKey = (RSAPublicKey) KeyTools.getPublicKeyFromX509("RSA",
                  new ByteArrayInputStream(publicKey.getBytes()));
              Signature verify = Signature.getInstance(algorithms.toString());
              verify.initVerify(pubKey);
  
              log.debug("构建私钥以及签名器");
              RSAPrivateKey priKey = (RSAPrivateKey) KeyTools.getPrivateKeyFromPKCS8("RSA",
                  new ByteArrayInputStream(privateKey.getBytes()));
              Signature sign = Signature.getInstance(algorithms.toString());
              sign.initSign(priKey);
  
              log.debug("SignatureHolder构建成功");
              return new SignatureHolder(sign, verify, priKey, pubKey);
          } catch (NoSuchAlgorithmException | InvalidKeyException e) {
              throw new SecureException("创建验签器[" + algorithms + "]失败", e);
          }
      }
docs: 使用指定公钥和RSA加密类型获取RSA验证器
  
  @param privateKey PKCS8文件格式的私钥
  @param publicKey  X509格式的公钥
  @param algorithms RSA加密类型
  @return RSA验证器