- java.lang.Object
-
- java.security.spec.SM2SignatureParameterSpec
-
- All Implemented Interfaces:
AlgorithmParameterSpec
public final class SM2SignatureParameterSpec extends Object implements AlgorithmParameterSpec
The parameters used by SM2 signature.
-
-
Constructor Summary
Constructors Constructor Description SM2SignatureParameterSpec(byte[] id, ECPublicKey publicKey)Create a newSM2SignatureParameterSpecwith ID and public key.SM2SignatureParameterSpec(ECPublicKey publicKey)Create a newSM2SignatureParameterSpecwith public key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getId()Returns the ID.ECPublicKeygetPublicKey()Returns the public key.
-
-
-
Constructor Detail
-
SM2SignatureParameterSpec
public SM2SignatureParameterSpec(byte[] id, ECPublicKey publicKey)Create a newSM2SignatureParameterSpecwith ID and public key.- Parameters:
id- the ID. it must not longer than 8192-bytes.publicKey- the SM2 public key.- Throws:
NullPointerException- ifpublicKeyis null.
-
SM2SignatureParameterSpec
public SM2SignatureParameterSpec(ECPublicKey publicKey)
Create a newSM2SignatureParameterSpecwith public key. It just uses the default ID, exactly1234567812345678.- Parameters:
publicKey- the SM2 public key.- Throws:
NullPointerException- ifpublicKeyis null.
-
-
Method Detail
-
getId
public byte[] getId()
Returns the ID.- Returns:
- the ID.
-
getPublicKey
public ECPublicKey getPublicKey()
Returns the public key.- Returns:
- the public key.
-
-