You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
322 B
19 lines
322 B
3 weeks ago
|
package com.util;
|
||
|
|
||
|
import cn.hutool.crypto.digest.DigestUtil;
|
||
|
|
||
|
/**
|
||
|
* Md5加密
|
||
|
*/
|
||
|
public class Md5Util {
|
||
|
/**
|
||
|
* @param text 明文
|
||
|
* @return 密文
|
||
|
*/
|
||
|
public static String strToMd5(String text) {
|
||
|
// 加密后的字符串
|
||
|
text = DigestUtil.md5Hex(text);
|
||
|
return text;
|
||
|
}
|
||
|
}
|