docs: public void verify(String signatureBaseString, String signature) throws InvalidSignatureException {
      if (publicKey == null) {
        throw new UnsupportedOperationException("A public key must be provided to verify signatures.");
      }
  
      try {
        byte[] signatureBytes = Base64.decodeBase64(signature.getBytes("UTF-8"));
        Signature verifier = Signature.getInstance("SHA1withRSA");
        verifier.initVerify(publicKey);
        verifier.update(signatureBaseString.getBytes("UTF-8"));
        if (!verifier.verify(signatureBytes)) {
          throw new InvalidSignatureException("Invalid signature for signature method " + getName());
        }
      }
      catch (UnsupportedEncodingException e) {
        throw new RuntimeException(e);
      }
      catch (NoSuchAlgorithmException e) {
        throw new IllegalStateException(e);
      }
      catch (InvalidKeyException e) {
        throw new IllegalStateException(e);
      }
      catch (SignatureException e) {
        throw new IllegalStateException(e);
      }
    }