universal-sha256-js

2.0.0 • Public • Published

Universal-SHA256-js

A SHA256 cryptographic hash function that is compatible with Node.js, Deno, and web browsers, and is designed to be extremely lightweight.

Setup

Node.js

npm i universal-sha256-js

Deno

import sha256 from "https://deno.land/x/sha256js/sha256.mjs";

Support

  • Node.js >16
  • Browser defaults, no IE 11
  • Deno ^1.30.0

Examples

Usage sha256

import sha256 from "universal-sha256-js/sha256.mjs";

const array = Uint8Array.from(
  Buffer.from("The quick brown fox jumped over the lazy dog")
);
sha256(array).then(console.log);

The logged output is [215, …, 146 ]

/universal-sha256-js/

    Package Sidebar

    Install

    npm i universal-sha256-js

    Weekly Downloads

    3

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    2.86 kB

    Total Files

    3

    Last publish

    Collaborators

    • pur3miish