@chainsafe/as-sha256
An AssemblyScript implementation of SHA256
Last updated 4 years ago by wemeetagain .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @chainsafe/as-sha256 
SYNC missed versions from official npm registry.

as-sha256

ES Version Node Version

AssemblyScript implementation of SHA256.

Usage

yarn add @chainsafe/as-sha256

import {digest, digest64, 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 = digest(Buffer.from("Hello world"));

// or use a faster one-pass interface for hashing (only) 64 bytes
hash = digest64(Buffer.from("abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh"));

License

Apache 2.0

Current Tags

  • 0.5.0                                ...           latest (5 months ago)

16 Versions

  • 0.5.0                                ...           5 months ago
  • 0.4.2                                ...           8 months ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.1                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.4                                ...           3 years ago
  • 0.2.3                                ...           3 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.4                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE