Skip to content

Commit d048732

Browse files
author
Lucien Grondin
committed
simplify debase58 slightly
1 parent a023865 commit d048732

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bitcoin.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ decodeBase58() {
6868
echo -n "$1" | sed -e's/^\(1*\).*/\1/' -e's/1/00/g' | tr -d '\n'
6969
echo "$1" |
7070
{
71-
echo "$dcr 16o 0"
71+
echo "$dcr 0"
7272
sed 's/./ 58*l&+/g'
7373
echo "[256 ~r d0<x]dsxx +f"
7474
} | dc |
75-
while read -r n
76-
do printf "%02x" "0x$n"
75+
while read n
76+
do printf "%02x" "$n"
7777
done
7878
}
7979

0 commit comments

Comments
 (0)