Newton's Principia Mathematica
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

bitcoin-hash

0.3.0 • Public • Published

Hash functions for Bitcoin applications

Installation

npm install bitcoin-hash

Example

var hash = require('bitcoin-hash')
 
var buf = new Buffer([1, 2, 3, 4])
 
var hash160 = hash.hash160(buf)

API

All methods take a Buffer as argument and return a Buffer.

hash.sha256(buf)

hash.dsha256(buf)

Two rounds of SHA256

hash.ripemd160(buf)

hash.hash160(buf)

One round of SHA256 followed by a round of RIPEMD160

Keywords

none

Install

npm i bitcoin-hash

DownloadsWeekly Downloads

0

Version

0.3.0

License

MIT

Last publish

Collaborators

  • avatar