Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

keccak256

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keccak256

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

latest
Source
npmnpm
Version
1.0.6
Version published
Weekly downloads
79K
9.07%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

crypto

FAQs

Package last updated on 10 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts