README
npm i sm2js
import sm2Encrypt from "sm2js";
var publicKey = "xxx";
sm2Encrypt('需要加密的数据', '公钥', 0)
npm i sm2js
<script type="module">
import sm2js from 'https://cdn.skypack.dev/sm2js';
</script>
npm i sm2js
import sm2Encrypt from "sm2js";
var publicKey = "xxx";
sm2Encrypt('需要加密的数据', '公钥', 0)