public class EncryptionUtil extends Object
| 构造器和说明 |
|---|
EncryptionUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decodeBase64(String encodeSource)
BASE64解码
|
static String |
encodeBase64(String source)
BASE64编码
|
static String |
md5(String body)
MD5 encryption
|
static String |
sha1Hmac(String str,
String secret) |
static String |
sha256Hmac(String str,
String secret)
sha256 Hmac加密
|
public static String md5(String body)
body - need to encryptionpublic static String encodeBase64(String source)
source - 要编码的字符串public static String decodeBase64(String encodeSource)
encodeSource - 编码过的字符串public static String sha256Hmac(String str, String secret)
str - 需要加密的消息secret - 秘钥Copyright © 2019. All rights reserved.