Post
Topic
Board Bitcoin Technical Support
Re: Private Key to WIF?
by
DannyHamilton
on 18/11/2013, 21:46:35 UTC
I'm porting it from https://github.com/bkkcoins/misc/blob/master/hexwif/hexwif

and it's pretty much the exact same code, isn't it?

Note the last line of the code at that link:

Code:
print alphabet[bn] + out

alphabet[bn] in that code is equivalent to the $alphabet[gmp_strval($divmod[0])] that is missing from your code.