$ b58enc() { y='123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';export BC_LINE_LENGTH=180;for q in $(echo $1|tr [a-z] [A-Z]|sed -e "s/^/ibase=16;obase=3A;/;s/ .*//"|bc);do echo -n ${y:$(echo $q|bc):1};done;}Performs base58 encoding from a string of ASCII-encoded hex digits.
Used by the bitoin passphrase-to-key generator.
by David Winterbottom (codeinthehole.com)
from All commands http://ift.tt/1gpo2Nl
No comments:
Post a Comment