Package | Description |
---|---|
cn.hutool.crypto |
加密解密模块,实现了对JDK中加密解密算法的封装,入口为SecureUtil,实现了:
1.
|
cn.hutool.crypto.digest |
摘要加密算法实现,入口为DigestUtil
|
cn.hutool.crypto.digest.otp |
OTP 是 One-Time Password的简写,表示一次性密码。
|
Modifier and Type | Method and Description |
---|---|
static HMac |
SecureUtil.hmac(HmacAlgorithm algorithm,
byte[] key)
创建HMac对象,调用digest方法可获得hmac值
|
static HMac |
SecureUtil.hmac(HmacAlgorithm algorithm,
SecretKey key)
创建HMac对象,调用digest方法可获得hmac值
|
static HMac |
SecureUtil.hmac(HmacAlgorithm algorithm,
String key)
创建HMac对象,调用digest方法可获得hmac值
|
Modifier and Type | Method and Description |
---|---|
static HmacAlgorithm |
HmacAlgorithm.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HmacAlgorithm[] |
HmacAlgorithm.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static HMac |
DigestUtil.hmac(HmacAlgorithm algorithm,
byte[] key)
创建HMac对象,调用digest方法可获得hmac值
|
static HMac |
DigestUtil.hmac(HmacAlgorithm algorithm,
SecretKey key)
创建HMac对象,调用digest方法可获得hmac值
|
Constructor and Description |
---|
HMac(HmacAlgorithm algorithm)
构造,自动生成密钥
|
HMac(HmacAlgorithm algorithm,
byte[] key)
构造
|
HMac(HmacAlgorithm algorithm,
Key key)
构造
|
Modifier and Type | Field and Description |
---|---|
static HmacAlgorithm |
HOTP.HOTP_HMAC_ALGORITHM
默认HMAC算法.
|
Constructor and Description |
---|
HOTP(int passwordLength,
HmacAlgorithm algorithm,
byte[] key)
构造
|
TOTP(Duration timeStep,
int passwordLength,
HmacAlgorithm algorithm,
byte[] key)
构造
|
Copyright © 2024. All rights reserved.