Module java.base

Class SM2SignatureParameterSpec

    • Constructor Detail

      • SM2SignatureParameterSpec

        public SM2SignatureParameterSpec​(byte[] id,
                                         ECPublicKey publicKey)
        Create a new SM2SignatureParameterSpec with ID and public key.
        Parameters:
        id - the ID. it must not longer than 8192-bytes.
        publicKey - the SM2 public key.
        Throws:
        NullPointerException - if publicKey is null.
      • SM2SignatureParameterSpec

        public SM2SignatureParameterSpec​(ECPublicKey publicKey)
        Create a new SM2SignatureParameterSpec with public key. It just uses the default ID, exactly 1234567812345678.
        Parameters:
        publicKey - the SM2 public key.
        Throws:
        NullPointerException - if publicKey is 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.