Package com.smartfoxserver.v2.util
Class MD5
- java.lang.Object
-
- com.smartfoxserver.v2.util.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 hashjava.lang.String
getHash(java.lang.String s)
Generate the md5 hashstatic MD5
getInstance()
Return the one and only instance of this class
-
-
-
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
-
-