|
|
@ -2154,8 +2154,11 @@ int32_t bitcoin_wif2priv(uint8_t wiftaddr,uint8_t *addrtypep,bits256 *privkeyp,c |
|
|
|
{ |
|
|
|
memset(pbuf,0,sizeof(pbuf)); |
|
|
|
memcpy(pbuf+(38-len),buf,len); |
|
|
|
len += (38-len); |
|
|
|
ptr = pbuf; |
|
|
|
int32_t i; for (i=0; i<38; i++) |
|
|
|
printf("%02x ",pbuf[i]); |
|
|
|
printf("pbuf from %d\n",len); |
|
|
|
len += (38-len); |
|
|
|
} else ptr = buf; |
|
|
|
hash = bits256_doublesha256(0,ptr,len - 4); |
|
|
|
*addrtypep = (wiftaddr == 0) ? *ptr : ptr[1]; |
|
|
|