Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pur3miish/universal-sha256-js
Lightweight universal JavaScript SHA256 cryptographic hash function (node + browsers).
https://github.com/pur3miish/universal-sha256-js
Last synced: 14 days ago
JSON representation
Lightweight universal JavaScript SHA256 cryptographic hash function (node + browsers).
- Host: GitHub
- URL: https://github.com/pur3miish/universal-sha256-js
- Owner: pur3miish
- Created: 2022-10-14T16:22:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-22T19:41:48.000Z (over 1 year ago)
- Last Synced: 2024-10-05T12:36:31.490Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
Awesome Lists containing this project
README
# 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
```shell
npm i universal-sha256-js
```Deno
```js
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`
```js
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 ]