19 package com.basistech.df.cybertriage.autopsy.ctapi.util;
21 import com.license4j.HardwareID;
22 import java.net.InetAddress;
23 import java.net.UnknownHostException;
24 import java.util.logging.Level;
25 import org.apache.commons.lang3.StringUtils;
36 private static final String
USER_NAME = System.getProperty(
"user.name");
49 if (StringUtils.isBlank(cachedId)) {
51 String hostName = StringUtils.defaultString(InetAddress.getLocalHost().getCanonicalHostName());
52 String macAddressMd5 = StringUtils.isNotBlank(HardwareID.getHardwareIDFromEthernetAddress())
56 String usernameMd5 = StringUtils.isNotBlank(USER_NAME)
60 cachedId = macAddressMd5 +
"_" + usernameMd5;
62 }
catch (UnknownHostException ex) {
63 LOGGER.log(Level.WARNING,
"Unable to determine host name.", ex);
static final String USER_NAME
static final Logger LOGGER
static String getMD5MessageDigest(String inp)
static String generateLicenseHostID()
synchronized static Logger getLogger(String name)