Package com.foxinmy.weixin4j.util
Class DigestUtil
- java.lang.Object
-
- com.foxinmy.weixin4j.util.DigestUtil
-
public final class DigestUtil extends Object
签名工具类- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
-
-
Constructor Summary
Constructors Constructor Description DigestUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
HMACSHA256(String content, String key)
HMAC-SHA256签名static String
MD5(String content)
MD5签名static String
SHA(String content)
SHA签名static String
SHA1(String content)
SHA1签名
-
-
-
Method Detail
-
SHA1
public static String SHA1(String content)
SHA1签名- Parameters:
content
- 待签名字符串- Returns:
- 签名后的字符串
-
HMACSHA256
public static String HMACSHA256(String content, String key) throws InvalidKeyException
HMAC-SHA256签名- Parameters:
content
- 待签名字符串key
- 支付密钥- Returns:
- Throws:
InvalidKeyException
-
-