JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 64357
  • Score
    100M100P100Q148985F
  • License

A wrapper for the keccak library to compute 256 bit keccak hash in JavaScript

Package Exports

  • keccak256
  • keccak256/dist/keccak256.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (keccak256) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

keccak256

A wrapper for the keccak library to compute 256 bit keccak hash in JavaScript.

License Build Status

js-standard-style

Install

npm install keccak256

CDN

Available on jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/keccak256@latest/keccak256.js"></script>

Usage

  • keccak256(data) -> {Buffer}

    • {String | Buffer} data - data string or Buffer

    Returns a Buffer

Getting Started

const keccak256 = require('keccak256')

console.log(keccak256('hello').toString('hex')) // "1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"

console.log(keccak256(Buffer.from('hello')).toString('hex')) // "1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"

Test

npm test

License

MIT