Enum Class SignAlgorithm
- All Implemented Interfaces:
Serializable, Comparable<SignAlgorithm>, Constable
签名算法枚举
定义支持的签名算法类型
使用示例:
@SignVerify(algorithm = SignAlgorithm.HMAC_SHA256)
public Result createOrder() {
}
- Author:
- Kerbores(kerbores@riemann.tech)
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionHMAC-SHA256算法HMAC-SHA512算法RSA非对称签名(SHA256withRSA)国密SM2非对称签名(SM3WithSM2)国密SM3算法 -
Method Summary
Modifier and TypeMethodDescription获取算法名称static SignAlgorithmReturns the enum constant of this class with the specified name.static SignAlgorithm[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HMAC_SHA256
HMAC-SHA256算法推荐使用,安全性高,性能良好
-
SM3
国密SM3算法适用于国密合规场景(作为哈希摘要用途)
-
SM2
国密SM2非对称签名(SM3WithSM2)真正对标RSA的非对称签名,私钥签名、公钥验签
-
RSA
RSA非对称签名(SHA256withRSA)私钥签名、公钥验签
-
HMAC_SHA512
HMAC-SHA512算法安全性更高,但性能略低
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getAlgorithmName
-