package de.ivu.elect.jee.session;

import org.apache.commons.lang3.StringUtils;

public class SessionIdFilter {


  private static final int MAX_LENGTH = 15;

  public static String maskiere(String sessionId) {
    if (StringUtils.isBlank(sessionId) || sessionId.length() <= MAX_LENGTH) {
      return sessionId;
    }
    return StringUtils.abbreviate(sessionId, "...", MAX_LENGTH);
  }
}
