Package | Description |
---|---|
cn.hutool.crypto |
加密解密模块,实现了对JDK中加密解密算法的封装,入口为SecureUtil,实现了:
1.
|
cn.hutool.crypto.digest |
摘要加密算法实现,入口为DigestUtil
|
Modifier and Type | Method and Description |
---|---|
static String |
SecureUtil.generateAlgorithm(AsymmetricAlgorithm asymmetricAlgorithm,
DigestAlgorithm digestAlgorithm)
生成算法,格式为XXXwithXXX
|
static Signature |
SecureUtil.generateSignature(AsymmetricAlgorithm asymmetricAlgorithm,
DigestAlgorithm digestAlgorithm)
生成签名对象,仅用于非对称加密
|
static String |
SignUtil.signParams(DigestAlgorithm digestAlgorithm,
Map<?,?> params,
String... otherParams)
对参数做签名
参数签名为对Map参数按照key的顺序排序后拼接为字符串,然后根据提供的签名算法生成签名字符串 拼接后的字符串键值对之间无符号,键值对之间无符号,忽略null值 |
static String |
SecureUtil.signParams(DigestAlgorithm digestAlgorithm,
Map<?,?> params,
String... otherParams)
对参数做签名
参数签名为对Map参数按照key的顺序排序后拼接为字符串,然后根据提供的签名算法生成签名字符串 拼接后的字符串键值对之间无符号,键值对之间无符号,忽略null值 |
static String |
SignUtil.signParams(DigestAlgorithm digestAlgorithm,
Map<?,?> params,
String separator,
String keyValueSeparator,
boolean isIgnoreNull,
String... otherParams)
对参数做签名
参数签名为对Map参数按照key的顺序排序后拼接为字符串,然后根据提供的签名算法生成签名字符串 |
static String |
SecureUtil.signParams(DigestAlgorithm digestAlgorithm,
Map<?,?> params,
String separator,
String keyValueSeparator,
boolean isIgnoreNull,
String... otherParams)
对参数做签名
参数签名为对Map参数按照key的顺序排序后拼接为字符串,然后根据提供的签名算法生成签名字符串 |
Modifier and Type | Method and Description |
---|---|
static DigestAlgorithm |
DigestAlgorithm.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DigestAlgorithm[] |
DigestAlgorithm.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static Digester |
DigestUtil.digester(DigestAlgorithm algorithm)
新建摘要器
|
Constructor and Description |
---|
Digester(DigestAlgorithm algorithm)
构造
|
Digester(DigestAlgorithm algorithm,
Provider provider)
构造
|
Copyright © 2024. All rights reserved.