The best possible help would be to take @niftynei's Base58 class.