import{sm2}from'sm-crypto-v2'constcipherMode=1// 1 - C1C3C2,0 - C1C2C3,默认为1// 支持使用 asn1 对加密结果进行编码,在 options 参数中传入 { asn1: true } 即可,默认不开启letencryptData=sm2.doEncrypt(msgString,publicKey,cipherMode,{asn1:false})// 加密结果// 支持使用 asn1 对密文进行...
import { sm2 } from 'sm-crypto-v2' const cipherMode = 1 // 1 - C1C3C2,0 - C1C2C3,默认为1 // 支持使用 asn1 对加密结果进行编码,在 options 参数中传入 { asn1: true } 即可,默认不开启 let encryptData = sm2.doEncrypt(msgString, publicKey, cipherMode, { asn1: false }) // ...
国密算法 ts 版. Contribute to xieren58/sm-crypto-v2 development by creating an account on GitHub.
sm-crypto-v2 Cubelrti esm sm-crypto-v2 Version1.9.3LicenseMIT INSTALL Version: Learn more Statistics Requests0 Bandwidth0 Top version -0 Full sm-crypto-v2 Download Stats Share Keywords sm js crypto
国密算法 ts 版. Contribute to Cubelrti/sm-crypto-v2 development by creating an account on GitHub.
{ "type": "git", "url": "git+https://github.com/Cubelrti/sm-crypto-v2" }, "keywords": [ "sm", "js", "crypto" ], "jest": { "testEnvironment": "jsdom", "testURL": "https://jest.test" }, "author": "june_01", "license": "MIT", "dependencies": { "@noble/curves"...
Breadcrumbs sm-crypto-v2 / CHANGELOG.mdTop File metadata and controls Preview Code Blame 195 lines (99 loc) · 6.34 KB Raw Changelog All notable changes to this project will be documented in this file. See standard-version for commit guidelines. 1.9.0 (2023-12-27) Features sm2: support ...
const { publicKey, privateKey } = sm2.generateKeyPairHex(); let sigValueHex = sm2.doSignature('SM国密2', privateKey, { hash: true, der: true }); 换成英文和阿拉伯数字可以验证通过,中文的会报签名不一致,库里的验签结果显示是true 下面是在线网站 https://tool.
国密算法 ts 版. Contribute to xieren58/sm-crypto-v2 development by creating an account on GitHub.
国密算法 ts 版. Contribute to xieren58/sm-crypto-v2 development by creating an account on GitHub.