public void ipCheck(EidSession session, String clientIp) {
        if (session.getClientIpAddress() != null && !session.getClientIpAddress().isEmpty()) {
            String[] clientIps = clientIp.split(", ");

            byte[] data = clientIps[0].concat(sourceIpSalt).getBytes(StandardCharsets.UTF_8);
            String anonimizedIp = Base64.toBase64String(DigestUtils.digest("SHA256").digest(data));
            if (!anonimizedIp.equals(session.getClientIpAddress())) {
                String logMessage = String.format(
                        "Security exception: Browser and Desktop client IP doesn't match: %s expected: %s",
                        anonimizedIp, session.getClientIpAddress());
                if (sourceIpCheck) {
                    throw new ClientException(logMessage);
                } else {
                    logger.warn(logMessage);
                }
            }
        }
    }
@Test
    public void testIpCheckCorrectIp() {
        setIpCheck(true);
        EidSession session = new EidSession();
        session.setClientIpAddress("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
        assertDoesNotThrow(() -> target.ipCheck(session, "SSSSSSSSSSSSSS"));
    }