java.lang.Object
java.security.spec.ECParameterSpec
java.security.spec.SM2ParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
The SM2 elliptic curve parameter specification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BigIntegerThe cofactor.static final EllipticCurveThe SM2 elliptic curve.static final ECPointThe generator or base point.static final StringThe OID of the SM2 elliptic curve.static final BigIntegerThe order of the generator. -
Method Summary
Modifier and TypeMethodDescriptionstatic SM2ParameterSpecinstance()Returns the instance of SM2ParameterSpec.static booleanisCurveSM2(byte[] encodedOid) Indicates if the encoded OID is SM2 elliptic curve.static booleanisCurveSM2(String oid) Indicates if the OID is SM2 elliptic curve.Methods declared in class java.security.spec.ECParameterSpec
getCofactor, getCurve, getGenerator, getOrder
-
Field Details
-
CURVE
The SM2 elliptic curve. -
GENERATOR
The generator or base point. -
ORDER
The order of the generator. -
COFACTOR
The cofactor. -
OID
The OID of the SM2 elliptic curve.- See Also:
-
-
Method Details
-
instance
Returns the instance of SM2ParameterSpec.- Returns:
- the instance of SM2ParameterSpec
-
isCurveSM2
public static boolean isCurveSM2(byte[] encodedOid) Indicates if the encoded OID is SM2 elliptic curve.- Parameters:
encodedOid- the encoded OID.- Returns:
- true if the encoded OID is SM2 elliptic curve; otherwise false.
-
isCurveSM2
Indicates if the OID is SM2 elliptic curve.- Parameters:
oid- the encoded OID.- Returns:
- true if the OID is SM2 elliptic curve; otherwise false.
-