code: public String verifyAndExtract(String signedStr) {
      int index = signedStr.lastIndexOf(SIGNATURE);
      if (index == -1) {
        throw new IllegalArgumentException("Invalid input sign: " + signedStr);
      }
      String originalSignature = signedStr.substring(index + SIGNATURE.length());
      String rawValue = signedStr.substring(0, index);
      String currentSignature = getSignature(rawValue);
  
      if (LOG.isDebugEnabled()) {
        LOG.debug("Signature generated for " + rawValue + " inside verify is " + currentSignature);
      }
      if (!originalSignature.equals(currentSignature)) {
        throw new IllegalArgumentException("Invalid sign, original = " + originalSignature +
          " current = " + currentSignature);
      }
      return rawValue;
    }
docs: Verify a signed string and extracts the original string.
  @param signedStr The already signed string
  @return Raw Value of the string without the signature