Class SM2Cipher
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.ofdrw.gm.sm2strut.SM2Cipher
- All Implemented Interfaces:
org.bouncycastle.asn1.ASN1Encodable, org.bouncycastle.util.Encodable
public class SM2Cipher
extends org.bouncycastle.asn1.ASN1Object
GBT 35276-2017 7.2 加密数据格式
- Since:
- 2021-07-29 20:08:03
- Author:
- 权观宇
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Convert ASN.1 Struct to C1C3C2 formatstatic SM2CipherfromC1C3C2(byte[] c1c3c2) Convert SM2 encrypted result format of c1c3c2 to ASN.1 SM2Cipherorg.bouncycastle.asn1.ASN1OctetStringorg.bouncycastle.asn1.ASN1OctetStringgetHash()static SM2Cipherorg.bouncycastle.asn1.ASN1Integerorg.bouncycastle.asn1.ASN1IntegervoidsetCipherText(org.bouncycastle.asn1.ASN1OctetString cipherText) voidsetHash(org.bouncycastle.asn1.ASN1OctetString hash) voidsetxCoordinate(org.bouncycastle.asn1.ASN1Integer xCoordinate) voidsetyCoordinate(org.bouncycastle.asn1.ASN1Integer yCoordinate) org.bouncycastle.asn1.ASN1PrimitiveMethods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
SM2Cipher
public SM2Cipher() -
SM2Cipher
public SM2Cipher(org.bouncycastle.asn1.ASN1Sequence seq)
-
-
Method Details
-
getInstance
-
getxCoordinate
public org.bouncycastle.asn1.ASN1Integer getxCoordinate() -
setxCoordinate
public void setxCoordinate(org.bouncycastle.asn1.ASN1Integer xCoordinate) -
getyCoordinate
public org.bouncycastle.asn1.ASN1Integer getyCoordinate() -
setyCoordinate
public void setyCoordinate(org.bouncycastle.asn1.ASN1Integer yCoordinate) -
getHash
public org.bouncycastle.asn1.ASN1OctetString getHash() -
setHash
public void setHash(org.bouncycastle.asn1.ASN1OctetString hash) -
getCipherText
public org.bouncycastle.asn1.ASN1OctetString getCipherText() -
setCipherText
public void setCipherText(org.bouncycastle.asn1.ASN1OctetString cipherText) -
toASN1Primitive
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()- Specified by:
toASN1Primitivein interfaceorg.bouncycastle.asn1.ASN1Encodable- Specified by:
toASN1Primitivein classorg.bouncycastle.asn1.ASN1Object
-
convertC1C3C2
Convert ASN.1 Struct to C1C3C2 format- Returns:
- C1C3C2
- Throws:
IOException- IO操作异常
-
fromC1C3C2
Convert SM2 encrypted result format of c1c3c2 to ASN.1 SM2Cipher- Parameters:
c1c3c2- encrypted result- Returns:
- SM2Cipher
- Throws:
IOException- IO操作异常
-