@li0ard/sm3 - v0.1.1
    Preparing search index...

    @li0ard/sm3 - v0.1.1

    @li0ard/sm3
    SM3 hash function in pure TypeScript
    docs




    # from NPM
    npm i @li0ard/sm3

    # from JSR
    bunx jsr i @li0ard/sm3
    • Provides simple and modern API
    • Most of the APIs are strictly typed
    • Fully complies with GB/T 32905-2016 (in Chinese) standard
    • Supports Bun, Node.js, Deno, Browsers
    import { SM3 } from "@li0ard/sm3";

    let hash = new SM3();
    hash.update(new TextEncoder().encode("hello world"));
    console.log(hash.digest());

    // -- OR --

    import { sm3 } from "@li0ard/sm3";

    console.log(sm3(new TextEncoder().encode("hello world")));