import crypto from "crypto" ; param data returns export function sha256 ( data ) { const hash = crypto . createHash ( "sha256" ) ; hash . update ( data ) ; return hash . digest ( ) ; } param data returns export function ripemd160 ( data ) { const hash = crypto . createHash ( "ripemd160" ) ; hash . update ( data ) ; return hash . digest ( ) ; } param data returns export function hash160 ( data ) { return ripemd160 ( sha256 ( data ) ) ; } param data returns export function hash256 ( data ) { return sha256 ( sha256 ( data ) ) ; }