类 CryptoUtil
java.lang.Object
tech.mhuang.pacebox.core.util.CryptoUtil
加密工具类
- 从以下版本开始:
- 1.0.0
- 作者:
- mhuang
-
方法概要
-
方法详细资料
-
encrypt
public static String encrypt(String inputText, String algorithmName) throws UnsupportedEncodingException, NoSuchAlgorithmException md5或者sha-1加密.- 参数:
inputText- 要加密的内容algorithmName- 加密算法名称:md5或者sha-1以及其他,不区分大小写- 返回:
- 返回对应的数据
- 抛出:
UnsupportedEncodingException- 无法支持的编码类型NoSuchAlgorithmException- 不支持的协议IllegalArgumentException- 不支持的参数
-