react / wstein / node_modules / browserify / node_modules / crypto-browserify / node_modules / create-hash / node_modules / ripemd160 / README.md
80555 viewsripemd160
JavaScript component to compute the RIPEMD-160 hash of strings or bytes. This hash is commonly used in crypto currencies like Bitcoin.
Usage
Install
ripemd160(input)
input
should be either a string
, Buffer
, or an Array
. It returns a Buffer
.
example 1:
example 2:
Converting Buffers
If you're not familiar with the Node.js ecosystem, type Buffer
is a common way that a developer can pass around binary data. Buffer
also exists in the Browserify environment. Converting to and from Buffers is very easy.
To buffer
From buffer
Testing
Install dev deps:
Test in Node.js:
Test in a Browser:
Testing in the browser uses the excellent Mochify. Mochify can use either PhantomJS or an actual browser. You must have Selenium installed if you want to use an actual browser. The easiest way is to npm install -g start-selenium
and then run start-selenium
.
Then run:
License
Licensed: BSD3-Clause