@nsrd/nsm
v1.1.4
Published
nsm is a sm utils of javascript for NeuqSoft RD.
Downloads
5
Readme
@nsrd/nsm
nsm is a sm utils of javascript for NeuqSoft RD.
Install
iife
<script src="nsm.min.js"></script>
nsm
will be registered as a global variable.
esm
$ npm install @nsrd/nsm --save
import nsm from "@nsrd/nsm";
Usage
sm2 decrypt
nsm.sm2Decrypt(privateKey, encryptedMessage);
sm3 with sm2 signature
nsm.sm2Signature(privateKey, publicKey, message);
sm3 with sm2 verify signature
nsm.sm2VerifySignature(publicKey, message, signature);
sm3 hash
nsm.sm3(message);
sm4
nsm.sm4(key, message);