Module java.base

Class SM2PublicKeySpec

java.lang.Object
java.security.spec.ECPublicKeySpec
java.security.spec.SM2PublicKeySpec
All Implemented Interfaces:
KeySpec

public final class SM2PublicKeySpec extends ECPublicKeySpec
A SM2 public key with the specified value.
  • Constructor Details

    • SM2PublicKeySpec

      public SM2PublicKeySpec(ECPoint pubPoint)
      Create a new SM2PublicKeySpec with a public point.
      Parameters:
      pubPoint - the public point.
    • SM2PublicKeySpec

      public SM2PublicKeySpec(byte[] encodedPubPoint)
      Create a new SM2PublicKeySpec with an encoded public point.
      Parameters:
      encodedPubPoint - the public point encoded in the format 0x04||x||y. x and y are the point coordinates.