public enum HmacAlgorithm extends Enum<HmacAlgorithm> implements Algorithm
| 枚举常量和说明 |
|---|
HmacMD5
The HmacMD5 Message Authentication Code (MAC) algorithm specified in RFC 2104 and RFC 1321.
|
HmacSHA1
The HmacSHA1 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
|
HmacSHA224
The HmacSHA224 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
|
HmacSHA256
The HmacSHA256 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
|
HmacSHA384
The HmacSHA384 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
|
HmacSHA512
The HmacSHA512 Message Authentication Code (MAC) algorithm specified in RFC 2104 and FIPS PUB 180-2.
|
HmacSM3
HmacSM3算法实现,需要BouncyCastle库支持
|
SM4CMAC
SM4 CMAC模式实现,需要BouncyCastle库支持
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
code()
算法的字符串标识
|
static HmacAlgorithm |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static HmacAlgorithm[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final HmacAlgorithm HmacMD5
public static final HmacAlgorithm HmacSHA1
public static final HmacAlgorithm HmacSHA224
public static final HmacAlgorithm HmacSHA256
public static final HmacAlgorithm HmacSHA384
public static final HmacAlgorithm HmacSHA512
public static final HmacAlgorithm HmacSM3
public static final HmacAlgorithm SM4CMAC
public static HmacAlgorithm[] values()
for (HmacAlgorithm c : HmacAlgorithm.values()) System.out.println(c);
public static HmacAlgorithm valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值Copyright © 2025 fossc. All rights reserved.