Class GBT35275Validate

java.lang.Object
org.ofdrw.gm.sm2strut.GBT35275Validate

public class GBT35275Validate extends Object
根据 GM/T 0099-2020 7.2.2 数据格式要求

b) 签名类型为数字签名且签名算法使用SM2时,签名值数据应符合 GB/T 35275 要求

数字签名验证容器

Since:
2021-8-9 16:15:11
Author:
权观宇
  • Constructor Details

    • GBT35275Validate

      public GBT35275Validate()
  • Method Details

    • validate

      public static VerifyInfo validate(String alg, byte[] tbsContent, byte[] signedValue) throws GeneralSecurityException
      验证 GBT35275 SignedData数据
      Parameters:
      alg - 算法
      tbsContent - 待签名数据原文,不需要提前计算摘要
      signedValue - 签名值DER编码
      Returns:
      验证结果
      Throws:
      GeneralSecurityException - 签名计算法错误