Bitcoin base58 encode/decode functions.