Base58 encode/decode functions.