package com.lightafire.utils;
import org.apache.commons.codec.digest.DigestUtils;
/**
* EasyDigestUtil
*
* @author lightafire
*/
public class EasyDigestUtil {
private enum ALGORITHM_NAME {
MD2,
MD5,
SHA_1,
SHA_256,
SHA_384,
SHA_512
}
/**
* 编码字符串
*
* @param sourceStr 需要编码的字符串
* @param algorithmsName 算法名称(如:MD2,MD5,SHA1,SHA256,SHA384,SHA512)
* @return
java md5,sha编码工具类DigestUtils
最新推荐文章于 2024-07-03 09:31:20 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)