Class SM9Signature
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.gm.SM9Signature
- All Implemented Interfaces:
ASN1Encodable, Encodable
The SM9 signature data structure of GM/T 0080-2020 (the (h, S) values are
defined by the signature algorithm in GM/T 0044.2).
SM9Signature ::= SEQUENCE {
h OCTET STRING, -- the integer h, 32 bytes big-endian
S BIT STRING -- the point S of G1, uncompressed (0x04 || x || y)
}
The h OCTET STRING / S BIT STRING encoding has been cross-checked against the
GmSSL and gmsm (emmansun) reference implementations of GM/T 0080-2020. This is
the structure the JCA SM9 signature produces and consumes; the
lightweight SM9Signer works with the raw
h || S components, which this type wraps.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getH()static SM9Signaturebyte[]getS()Method providing a primitive representation of this object suitable for encoding.Methods inherited from class ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
SM9Signature
public SM9Signature(byte[] h, byte[] s)
-
-
Method Details
-
getInstance
-
getH
public byte[] getH() -
getS
public byte[] getS() -
toASN1Primitive
Description copied from class:ASN1ObjectMethod providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-