docs: public void verify(String signatureBaseString, String signature) throws InvalidSignatureException {
      try {
        if (LOG.isDebugEnabled()) {
          LOG.debug("signature base: " + signatureBaseString);
          LOG.debug("signature: " + signature);
        }
  
        byte[] signatureBytes = Base64.decodeBase64(signature.getBytes("UTF-8"));
  
        Mac mac = Mac.getInstance(MAC_NAME);
        mac.init(key);
        byte[] text = signatureBaseString.getBytes("UTF-8");
        byte[] calculatedBytes = mac.doFinal(text);
        if (!safeArrayEquals(calculatedBytes, signatureBytes)) {
          throw new InvalidSignatureException("Invalid signature for signature method " + getName());
        }
      }
      catch (NoSuchAlgorithmException e) {
        throw new IllegalStateException(e);
      }
      catch (InvalidKeyException e) {
        throw new IllegalStateException(e);
      }
      catch (UnsupportedEncodingException e) {
        throw new RuntimeException(e);
      }
    }