Enum Class CurveType
- All Implemented Interfaces:
Serializable, Comparable<CurveType>, Constable
Elliptic curve type enumeration - 椭圆曲线类型枚举
椭圆曲线类型的枚举定义
Features | 主要功能:
- Elliptic curve type definitions - 椭圆曲线类型定义
Usage Examples | 使用示例:
CurveType curve = CurveType.P_256;
Security | 安全性:
- Thread-safe: Yes - 线程安全: 是
- Null-safe: Partial - 空值安全: 部分
- Since:
- JDK 25, opencode-base-crypto V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCurve25519 for ECDH (X25519)Curve448 for ECDH (X448)Ed25519 curve for EdDSA signaturesEd448 curve for EdDSA signaturesNIST P-256 curve (secp256r1, prime256v1)NIST P-384 curve (secp384r1)NIST P-521 curve (secp521r1)secp256k1 curve (used in Bitcoin and Ethereum)SM2 curve (Chinese national standard, sm2p256v1) -
Method Summary
Modifier and TypeMethodDescriptionGets the standard curve name 获取标准曲线名称intGets the key size in bits 获取密钥大小(位)static CurveTypeReturns the enum constant of this class with the specified name.static CurveType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
P_256
NIST P-256 curve (secp256r1, prime256v1) -
P_384
NIST P-384 curve (secp384r1) -
P_521
NIST P-521 curve (secp521r1) -
SECP256K1
secp256k1 curve (used in Bitcoin and Ethereum) -
CURVE25519
Curve25519 for ECDH (X25519) -
CURVE448
Curve448 for ECDH (X448) -
ED25519
Ed25519 curve for EdDSA signatures -
ED448
Ed448 curve for EdDSA signatures -
SM2
SM2 curve (Chinese national standard, sm2p256v1)
-
-
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
-
getCurveName
-
getKeySize
public int getKeySize()Gets the key size in bits 获取密钥大小(位)- Returns:
- the key size
-