org.bouncycastle.asn1.gm
Class SM9Signature
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.gm.SM9Signature
- All Implemented Interfaces:
- ASN1Encodable, Encodable
- public class SM9Signature
- extends ASN1Object
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 signature produces and consumes; the
lightweight SM9Signer works with the raw
h || S components, which this type wraps.
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
SM9Signature
public SM9Signature(byte[] h,
byte[] s)
getInstance
public static SM9Signature getInstance(java.lang.Object o)
getH
public byte[] getH()
getS
public byte[] getS()
toASN1Primitive
public ASN1Primitive toASN1Primitive()
- Description copied from class:
ASN1Object
- Method providing a primitive representation of this object suitable for encoding.
- Specified by:
toASN1Primitive in interface ASN1Encodable- Specified by:
toASN1Primitive in class ASN1Object
- Returns:
- a primitive representation of this object.