Bitcoin Brainwallet Base58 Encoder

function b58encode () { local b58_lookup_table=({1..9} {A..H} {J..N} {P..Z} {a..k} {m..z}); bc<<<"obase=58;ibase=16;${1^^}"|(read -a s; for b58_index in "${s[@]}" ; do printf %s ${b58_lookup_table[ 10#"$b58_index" ]}; done); }
A bitcoin "brainwallet" is a secret passphrase you carry in your brain. The Bitcoin Brainwallet Private Key Base58 Encoder is the third of three functions needed to calculate a bitcoin PRIVATE key from your "brainwallet" passphrase. This base58 encoder uses the obase parameter of the amazing bc utility to convert from ASCII-hex to base58. Tech note: bc inserts line continuation backslashes, but the "read s" command automatically strips them out. I hope that one day base58 will, like base64, be added to the amazing openssl utility.
Sample Output
> b58encode 0123456789abcdef
> C3CPq7c8PY

What Others Think

The Bitcoin brain wallet base has been sharing encodes for bitcoin for a long time. Now you can get Computer Support to get help to solve your issue easily. Bitcoin now has become the most expensive coin on the earth. People who are having these coins are very lucky.
HaydenGipps · 28 weeks and 2 days ago
This is something useful for those who are really new to the programming field as they always do your the doubts related to the programming code through this post and I always loved to try out the programs and codes that are shared in this page Falls Home Assisted Living Facility
Kaitlyn · 5 weeks and 4 days ago
They have provided the code for Bitcoin brain wallet definitely are the helpful source and they have also shared the code so hope it will be helpful for us and keep on sharing more such helpful content best place to buy diamond rings
Dwyane · 2 weeks and 6 days ago
you are planning for cryptocurrency in an online casino, it is important to know whether the website or platform is safe to play or not. This site provides you list of top crypto gambling websites which can help you choose best.
lee0987 · 1 week and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: