- java.lang.Object
-
- java.security.spec.ECParameterSpec
-
- java.security.spec.SM2ParameterSpec
-
- All Implemented Interfaces:
AlgorithmParameterSpec
public final class SM2ParameterSpec extends ECParameterSpec
The SM2 elliptic curve parameter specification.
-
-
Field Summary
Fields Modifier and Type Field Description static BigIntegerCOFACTORThe cofactor.static EllipticCurveCURVEThe SM2 elliptic curve.static ECPointGENERATORThe generator or base point.static StringOIDThe OID of the SM2 elliptic curve.static BigIntegerORDERThe order of the generator.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
CURVE
public static final EllipticCurve CURVE
The SM2 elliptic curve.
-
GENERATOR
public static final ECPoint GENERATOR
The generator or base point.
-
ORDER
public static final BigInteger ORDER
The order of the generator.
-
COFACTOR
public static final BigInteger COFACTOR
The cofactor.
-
OID
public static final String OID
The OID of the SM2 elliptic curve.- See Also:
- Constant Field Values
-
-
Method Detail
-
instance
public static SM2ParameterSpec 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
public static boolean isCurveSM2(String oid)
Indicates if the OID is SM2 elliptic curve.- Parameters:
oid- the encoded OID.- Returns:
- true if the OID is SM2 elliptic curve; otherwise false.
-
-