Author

Topic: Asking for code to convert hex key to hash160 (Javascript without node.js) (Read 191 times)

newbie
Activity: 3
Merit: 0
if you can't find the function in a library then do it yourself! the library must have a function to get a "public key" from your private key. use that and then simply hash the result (the pubkey) yourself using RIPEMD160(SHA256(pubk)).
and by the way base58 is not the bottleneck in this process the conversion from private key to public key is the slowest operation and in comparison base58 encoding time is nothing. so if you are trying something like brute force that needs efficiency then you might want to look into that part instead.
I'm looking for a code without using external library, i found one on this https://bitcointalksearch.org/topic/how-to-use-bitcoinjs-in-a-normal-website-not-using-nodejs-or-anything-750022 which can create random key but lack function to convert hex to key & can't call the  RIPEMD160() & Buffer(), the code calling method pretty different from bitcoinjs which is why i hope there're codes that can provide small functions at a time aside from this one
legendary
Activity: 3472
Merit: 10611
if you can't find the function in a library then do it yourself! the library must have a function to get a "public key" from your private key. use that and then simply hash the result (the pubkey) yourself using RIPEMD160(SHA256(pubk)).
and by the way base58 is not the bottleneck in this process the conversion from private key to public key is the slowest operation and in comparison base58 encoding time is nothing. so if you are trying something like brute force that needs efficiency then you might want to look into that part instead.
newbie
Activity: 3
Merit: 0
May i ask if is there any javascript code to turn a hex private key into a hash160 output without require() using node.js. bitcoin code usually return base58 compressed or uncompressed address of a priv key but i hope to skip base58 convert of hash160 to save performance time. Thank You
Jump to: