Class 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 platform charset.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NameUtil

        private NameUtil()
    • 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 platform charset.

        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