class ChecksumCalculatingFactory {

    public Optional<ChecksumCalculatingService> getServiceByChecksum(byte[] checksum, ConsentType consentType) {
        if (checksum == null) {
            return getDefaultService(consentType);
        }

        String checksumStr = new String(checksum);
        String[] elements = checksumStr.split(ChecksumConstant.DELIMITER);

        if (elements.length < 1) {
            return getDefaultService(consentType);
        }

        String versionSting = elements[ChecksumConstant.VERSION_START_POSITION];

        return Optional.ofNullable(services.get(new MultiKey(versionSting, consentType)));
    }

}