public/subjects/blockchain/hash-160
nprimo 4fa5c876a7 docs: run prettify and move h1 to h2 2023-06-09 09:17:48 +01:00
..
README.md docs: run prettify and move h1 to h2 2023-06-09 09:17:48 +01:00

README.md

Hash160

Instructions

Create a function hash160 that takes one argument, expected to be a string, and returns the hash sha256 of this argument hashed again with the ripemd160 algorithm. The return value must be in a binary form.

Formally, it could be described as:

hash160 = sha256(ripemd160(input))

Usage

let hash = hash160('Ducks')
console.log(hash) // expected result : <Buffer de 5b 73 aa 85 84 02 d8 8c 36 d4 ff 85 29 65 d3 76 ac 6d 19>

Notions