public boolean isValid(SecretKey key) {
        return MessageDigest.isEqual(sign(mac, key, requestBody), requestSignature);
    }
Extract a signature from a request.

@param crypto        the cryptography library used to generate {@link Mac} instances, may not be null
@param requestBody   the body of the request; may not be null
@param headers       the headers for the request; may be null
@return the signature extracted from the request, or null if one or more request signature
headers was not present
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/InternalRequestSignature.java