public class GBT35275PKCS9DSContainer extends Object implements ExtendSignatureContainer
注该方法与GBT35275DSContainer 不同,签名对象为SignInfo中的 authenticatedAttributes字段,
authenticatedAttributes为一个CMS PKCS#9表示含签名时间、原文杂凑值的键值对结构。
该格式为数科验证兼容格式。
| 构造器和说明 |
|---|
GBT35275PKCS9DSContainer(@NotNull Certificate cert,
@NotNull PrivateKey prvKey)
创建数字签名容器
签名值数据应遵循 GB/T 35275
|
| 限定符和类型 | 方法和说明 |
|---|---|
MessageDigest |
getDigestFnc()
SM3摘要算法功能
|
byte[] |
getSeal()
电子签名不提供印章
|
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getSignAlgOID()
SM2WithSM3
|
org.ofdrw.core.signatures.SigType |
getSignType()
获取签名节点类型
|
byte[] |
sign(InputStream inData,
String propertyInfo)
对待签名数据签名
|
public GBT35275PKCS9DSContainer(@NotNull
@NotNull Certificate cert,
@NotNull
@NotNull PrivateKey prvKey)
签名值数据应遵循 GB/T 35275
cert - SM2签名证书,应符合GB/T 20518prvKey - 私钥public MessageDigest getDigestFnc()
getDigestFnc 在接口中 ExtendSignatureContainerpublic org.bouncycastle.asn1.ASN1ObjectIdentifier getSignAlgOID()
getSignAlgOID 在接口中 ExtendSignatureContainerpublic byte[] sign(InputStream inData, String propertyInfo) throws GeneralSecurityException, IOException
sign 在接口中 ExtendSignatureContainerinData - 待签名数据流propertyInfo - 忽略IOException - IO流读取异常SecurityException - 签名计算异常GeneralSecurityException - 签名计算异常public byte[] getSeal()
throws IOException
getSeal 在接口中 ExtendSignatureContainerIOException - 获取印章IO异常public org.ofdrw.core.signatures.SigType getSignType()
getSignType 在接口中 ExtendSignatureContainerCopyright © 2023. All rights reserved.