Skip to content

Commit 63506c2

Browse files
author
grondilu
committed
Merge pull request grondilu#4 from swansontec/master
Do not accept private keys longer than 32 bytes
2 parents 5493c71 + cb02438 commit 63506c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitcoin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ newBitcoinKey() {
9292
fi
9393
elif [[ "$1" =~ ^[0-9]+$ ]]
9494
then $FUNCNAME "0x$(dc -e "16o$1p")"
95-
elif [[ "${1^^}" =~ ^0X([0-9A-F]+)$ ]]
95+
elif [[ "${1^^}" =~ ^0X([0-9A-F]{1,64})$ ]]
9696
then
9797
local exponent="${BASH_REMATCH[1]}"
9898
local uncompressed_wif="$(hexToAddress "$exponent" 80 64)"

0 commit comments

Comments
 (0)