Class MD5


  • public final class MD5
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getBytes​(java.lang.String s)
      Generate binary md5 hash
      java.lang.String getHash​(java.lang.String s)
      Generate the md5 hash
      static MD5 getInstance()
      Return the one and only instance of this class
      • Methods inherited from class java.lang.Object

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

      • getInstance

        public static MD5 getInstance()
        Return the one and only instance of this class
        Returns:
        the instance
      • getHash

        public java.lang.String getHash​(java.lang.String s)
        Generate the md5 hash
        Parameters:
        s - a string
        Returns:
        a 32 character long string with the hex representation of the hash.
      • getBytes

        public byte[] getBytes​(java.lang.String s)
        Generate binary md5 hash
        Parameters:
        s - a string
        Returns:
        the 128bit MD5 hash