I am looking to generate a Bitcoin Address from an user input text (like the good old days Brainwallet). User input a "Text string" and based on this text string generate the corresponding Bitcoin Address. My google search lead me to NBitcoin and to this post: Generate address of 'private key' from user input
The user SVVC asked the same question got a reply from Prayank with a little code snippet but here I am stuck because the snippet didn't work and the Debugger gave me an Exception Unhandled "System.FormatException: 'Invalid hash of the base 58 string"
Anyone have an idea?
Here is my code in VisualBasic .Net with NBitcoin
Dim pk As String = "LoveIsTheKey"
Dim bitcoinPrivateKey = New BitcoinSecret(pk, Network.Main)
Dim legacy_address = bitcoinPrivateKey.GetAddress(ScriptPubKeyType.Legacy)
MessageBox.Show("Legacy Address : " + legacy_address.ToString)