modified: Recovering-Keys-Without-MMGen.md

philemon 2017-01-06 20:06:42 +03:00
commit c56f91597b
Signed by untrusted user who does not match committer: mmgen
GPG key ID: 62DBE9E5212F05BE

@ -141,10 +141,11 @@ try out at the Python prompt:
>>> print ''.join(reversed(result)).lstrip('1')
5HrrmMdQbELyW7iCns5kvSbN9GCPTqEfG7iP1PZiYk49yDDivTi
The variable 'b58a' holds the Base 58 alphabet, 'num' is the key converted to
decimal, the third line is the base conversion routine proper, and the last line
reverses the result, converts it to a string and strips off the leading zeroes
('1's). As you can see, the output matches the key we generated above.
The variable 'b58a' holds the Base 58 alphabet, 'num' holds the key converted
from hexidecimal to decimal using Python's `int()` function, the third line is
the base conversion routine proper, and the last line formats the result by
reversing it, converting it to a string and stripping off the leading zeroes
('1's). As you can see, the output matches the WIF key we generated above.
Those who know a bit of programming but are unfamiliar with Python might find
the following base conversion code clearer: