java.lang.Object
java.security.spec.SM2SignatureParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
The parameters used by SM2 signature.
-
Constructor Summary
ConstructorsConstructorDescriptionSM2SignatureParameterSpec
(byte[] id, ECPublicKey publicKey) Create a newSM2SignatureParameterSpec
with ID and public key.SM2SignatureParameterSpec
(ECPublicKey publicKey) Create a newSM2SignatureParameterSpec
with public key. -
Method Summary
-
Constructor Details
-
SM2SignatureParameterSpec
Create a newSM2SignatureParameterSpec
with ID and public key.- Parameters:
id
- the ID. it must not longer than 8192-bytes.publicKey
- the SM2 public key.- Throws:
NullPointerException
- ifpublicKey
is null.
-
SM2SignatureParameterSpec
Create a newSM2SignatureParameterSpec
with public key. It just uses the default ID, exactly1234567812345678
.- Parameters:
publicKey
- the SM2 public key.- Throws:
NullPointerException
- ifpublicKey
is null.
-
-
Method Details
-
getId
public byte[] getId()Returns the ID.- Returns:
- the ID.
-
getPublicKey
Returns the public key.- Returns:
- the public key.
-