Class MD5
- java.lang.Object
-
- com.alibaba.nacos.client.config.utils.MD5
-
public class MD5 extends Object
MD5 util- Author:
- Nacos
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringbytes2string(byte[] bt)将一个字节数组转化为可见的字符串static MD5getInstance()byte[]getMD5Bytes(byte[] content)StringgetMD5String(byte[] content)StringgetMD5String(String content)byte[]hash(byte[] data)对二进制数据进行md5byte[]hash(String str)对字符串进行md5
-
-
-
Method Detail
-
getInstance
public static MD5 getInstance()
-
getMD5String
public String getMD5String(byte[] content)
-
getMD5Bytes
public byte[] getMD5Bytes(byte[] content)
-
hash
public byte[] hash(String str)
对字符串进行md5- Parameters:
str-- Returns:
- md5 byte[16]
-
hash
public byte[] hash(byte[] data)
对二进制数据进行md5- Parameters:
data-- Returns:
- md5 byte[16]
-
bytes2string
public String bytes2string(byte[] bt)
将一个字节数组转化为可见的字符串- Parameters:
bt-- Returns:
-
-