<p>i upload a github repository. it takes text as input to generate private key, public key and segwit/bech32 address.</p>
<p><a href="https://github.com/drParadox312/Bitcoin_Key_Generator_From_Text_Input" rel="nofollow noreferrer">https://github.com/drParadox312/Bitcoin_Key_Generator_From_Text_Input</a></p>

CC BY-SA 4.0
2023-03-30T10:01:16.700Z
2023-05-15T09:42:17.653Z
2023-05-15T09:42:17.653Z
user141181
<p>I am looking to generate a Bitcoin Address from an user input text (like the good old days Brainwallet).
User input a &quot;Text string&quot; and based on this text string generate the corresponding Bitcoin Address. My google search lead me to NBitcoin and to this post: <a href="https://bitcoin.stackexchange.com/questions/100121/generate-address-of-private-key-from-user-input">Generate address of &#39;private key&#39; from user input</a></p>
<p>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 &quot;System.FormatException: 'Invalid hash of the base 58 string&quot;</p>
<p>Anyone have an idea?</p>
<p>Here is my code in VisualBasic .Net with NBitcoin</p>
<pre><code>Dim pk As String = &quot;LoveIsTheKey&quot;
Dim bitcoinPrivateKey = New BitcoinSecret(pk, Network.Main)
Dim legacy_address = bitcoinPrivateKey.GetAddress(ScriptPubKeyType.Legacy)
MessageBox.Show(&quot;Legacy Address : &quot; + legacy_address.ToString)
</code></pre>
<p>Thanks guys</p>

CC BY-SA 4.0
2021-08-25T23:38:07.160Z
*”Like the good old days Brainwallet”* - you mean when users were encouraged to create inherently insecure wallets, leading to an irrecoverable loss of funds? I assume that you won’t be taking the user input as the sole source of entropy for privkey generation?
chytrik
CC BY-SA 4.0
2021-08-25T23:51:49.830Z
There will be no user to my program I just want to make it for myself for research purposes.
Olivier Martin
CC BY-SA 4.0
2021-08-26T00:19:03.830Z
Do you have any idea?
Olivier Martin
<private-key><address-generation><private-key-import><c#><nbitcoin>
Generate BTC Private key from user string input
Olivier Martin
# Generate BTC Private key from user string input

(Asked by: username_0 on 2021-08-25)

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](https://bitcoin.stackexchange.com/questions/100121/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)

```

Thanks guys

**Tags:** private-key, address-generation, private-key-import, c#, nbitcoin

> **Comments:**
> **username_1**: *”Like the good old days Brainwallet”* - you mean when users were encouraged to create inherently insecure wallets, leading to an irrecoverable loss of funds? I assume that you won’t be taking the user input as the sole source of entropy for privkey generation?  
> **username_0**: There will be no user to my program I just want to make it for myself for research purposes.  
> **username_0**: Do you have any idea?  

---

## 1 answers

### Answer by username_2 on 2023-03-30. Score: 1

i upload a github repository. it takes text as input to generate private key, public key and segwit/bech32 address.

<https://github.com/drParadox312/Bitcoin_Key_Generator_From_Text_Input>


---

