boolean isApiKey(final String apiKey) {
        if (NullSafe.isBlankString(apiKey)) {
            return false;
        } else {
            final String trimmedApiKey = apiKey.trim();
            if (!trimmedApiKey.startsWith(API_KEY_STATIC_PREFIX)) {
                LOGGER.debug(() -> LogUtil.message("Doesn't start with api key static prefix '{}'",
                        API_KEY_STATIC_PREFIX));
                return false;
            }
            if (!API_KEY_MATCH_PREDICATE.test(trimmedApiKey)) {
                LOGGER.debug("Doesn't match pattern '{}'", API_KEY_PATTERN);
                return false;
            }
            final String[] parts = API_KEY_SEPARATOR_PATTERN.split(apiKey.trim());
            if (parts.length != 3) {
                LOGGER.debug("Incorrect number of parts: '{}', parts:", (Object) parts);
                return false;
            }
            final String hashPart = parts[1];
            final String codePart = parts[2];
            final String computedHash = computeTruncatedHash(codePart);
            if (!Objects.equals(hashPart, computedHash)) {
                LOGGER.debug("Hashes don't match, hashPart: '{}', computedHash: '{}'", hashPart, computedHash);
                return false;
            }
            return true;
        }
    }
Asserts that the passed string matches the format of a stroom API key and that the hash part of
the key matches the hash computed from the random code part.
Note, this method is NOT to be used for authenticating
an API key, for that see {@link ApiKeyService#fetchVerifiedIdentity(String)}. It simply verifies
that a string is very likely to be a stroom API key (whether valid/invalid, present/absent, enabled/disabled).
It can be used to see if a string passed in the {@code Authorization: Bearer ...} header is a stroom
API key before looking in the database to check its validity.

@return True if the hash part of the API key matches a computed hash of the random
code part of the API key and the string matches the pattern for an API key.
stroom-security/stroom-security-impl/src/main/java/stroom/security/impl/apikey/ApiKeyGenerator.java