mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
645 B
645 B
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
- Node.js crypto
- Wikipedia: Hash_function