Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

ChainSafe/as-sha256

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ebef2cf · Aug 10, 2021
Aug 10, 2021
Aug 6, 2021
Aug 6, 2021
Jan 5, 2020
Aug 10, 2021
Aug 10, 2021
Dec 9, 2019
Dec 9, 2019
Sep 6, 2020
May 6, 2021
Dec 13, 2019
Jul 3, 2020
Aug 22, 2019
Dec 9, 2019
Aug 10, 2021
Aug 10, 2021

Repository files navigation

as-sha256

ES Version Node Version

AssemblyScript implementation of SHA256.

Usage

yarn add @chainsafe/as-sha256

import SHA256 from "@chainsafe/as-sha256";

let hash: Uint8Array;

// create a new sha256 context
const sha256 = new SHA256();
// with init(), update(data), and final()
hash = sha256.init().update(Buffer.from("Hello world")).final();

// or use a one-pass interface
hash = SHA256.digest(Buffer.from("Hello world"));

License

Apache 2.0