|
|
@ -2162,7 +2162,7 @@ int32_t bitcoin_wif2priv(uint8_t wiftaddr,uint8_t *addrtypep,bits256 *privkeyp,c |
|
|
|
ptr = buf; |
|
|
|
hash = bits256_doublesha256(0,ptr,len - 4); |
|
|
|
*addrtypep = (wiftaddr == 0) ? *ptr : ptr[1]; |
|
|
|
memcpy(privkeyp,ptr+offset,32-(38-len)); |
|
|
|
memcpy(privkeyp,ptr+offset,32); |
|
|
|
if ( (ptr[len - 4]&0xff) == hash.bytes[31] && (ptr[len - 3]&0xff) == hash.bytes[30] &&(ptr[len - 2]&0xff) == hash.bytes[29] && (ptr[len - 1]&0xff) == hash.bytes[28] ) |
|
|
|
{ |
|
|
|
//int32_t i; for (i=0; i<len; i++)
|
|
|
|