@li0ard/sm2 - v0.1.0
    Preparing search index...

    @li0ard/sm2 - v0.1.0

    @li0ard/sm2
    SM2 curves and DSA in pure TypeScript
    docs




    # from NPM
    npm i @li0ard/sm2

    # from JSR
    bunx jsr i @li0ard/sm2
    • [x] DSA
    • [x] Key exchange
    • [x] Encryption schema
    • Provides simple and modern API
    • Most of the APIs are strictly typed
    • Fully complies with GB/T 32918-2016 standard
    • Supports Bun, Node.js, Deno, Browsers
    import { sign } from "@li0ard/sm2";

    const privateKey = hexToBytes("39...B8");
    const message = hexToBytes("6D65737361676520646967657374");

    console.log(sign(privateKey, message));