Class NameUtil
- java.lang.Object
-
- org.apache.logging.log4j.core.util.NameUtil
-
public final class NameUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NameUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getSubName(java.lang.String name)
static java.lang.String
md5(java.lang.String input)
Calculates the MD5 hash of the given input string encoded using the default platformcharset
.
-
-
-
Method Detail
-
getSubName
public static java.lang.String getSubName(java.lang.String name)
-
md5
public static java.lang.String md5(java.lang.String input)
Calculates the MD5 hash of the given input string encoded using the default platformcharset
.MD5 has severe vulnerabilities and should not be used for sharing any sensitive information. This function should only be used to create unique identifiers, e.g., configuration element names.
- Parameters:
input
- string to be hashed- Returns:
- string composed of 32 hexadecimal digits of the calculated hash
-
-