Package org.apache.shenyu.common.utils
Class DigestUtils
- java.lang.Object
-
- org.apache.shenyu.common.utils.DigestUtils
-
public class DigestUtils extends java.lang.ObjectDigestUtils.
-
-
Constructor Summary
Constructors Constructor Description DigestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringmd5Hex(byte[] data)Calculates the MD5 digest and returns the value as a 32 character hex string.static java.lang.Stringmd5Hex(java.lang.String data)Calculates the MD5 digest and returns the value as a 32 character hex string.static java.lang.Stringsha512Hex(java.lang.String data)Calculates the SHA-512 digest and returns the value as a hex string.
-
-
-
Method Detail
-
sha512Hex
public static java.lang.String sha512Hex(java.lang.String data)
Calculates the SHA-512 digest and returns the value as a hex string. if data is null or "" ,it will return null.- Parameters:
data- – Data to digest- Returns:
- SHA-512 digest as a hex string.
-
md5Hex
public static java.lang.String md5Hex(java.lang.String data)
Calculates the MD5 digest and returns the value as a 32 character hex string.- Parameters:
data- Data to digest- Returns:
- MD5 digest as a hex string
-
md5Hex
public static java.lang.String md5Hex(byte[] data)
Calculates the MD5 digest and returns the value as a 32 character hex string.- Parameters:
data- Data to digest- Returns:
- MD5 digest as a hex string
-
-