基于国密算法进行SM2加密和SM2解密的示例
为了确保安全,示例中的密钥会使用几个*号进行代替。
SM2公钥(长度130):
04383**********115EF146FF9E8D5BD9EE04A8799B4A7B49EAB39F02B6572CA8C2AF0C25EA02B77EDA895DBE5A966EC06793D65E0FE2C61778ED140BB818C95DF
SM2私钥(长度64):
E311F**********9899D01A29AEB08DCC474724CE764BBC8AD6D3E80EB4CF90D
待加密字符串:{"ecToken":"xxxxxxxxxssssssss","idNo":"340100198808089999","idType":"01","insuOrg":"010203","userName":"测试人员"}
加密结果:
04C7F78050665F2930BFD230FC17FBAA247D1D19529ABD9FD2B9255E6BE7FEFC47FC63F49B981ACD90A030FB5D005D548815D8D6E45ADC797D19E6B08C93902B4BF0C08D1749032FD1C7AD409E111006ECC99B8852A0FE4E0498234D726E4443EFA43112546FD5CF8D315366811000880716016D34FFED0345C5D3D49EB2B0FA38FFC264A537FC478D7088BB9125A3CAC72B086B8037E41629148BA9351D4B33A22BC6FA3FBCEC6477D56797299D6B563B109B9E82DB1901EE558447AE08844E0F82327E700D7D23DA267B24FD964CE293E3F86ACEC873
国密算法DLL下载:
国密SM4加解密SM2签名验签COM组件DLL.rar_delphi7sm4-其它文档类资源-CSDN下载