Bitcoin/address validation: Difference between revisions

m
('Off by one' error, but this is a critical fix. The entire range of items in output array must be evaluated. This change is necessary so that pay to script hash (P2SH) addresses that start with 3 can be validated as well.)
Line 602:
let address = toBytes ev
addressLength = length address
in if addressLength > 24 25
then Left "Address length exceeds 25 bytes"
else
Line 639:
"1ANa55215ZQXAZUgFiqJ2i7Z2DPU2J6hW62i" -> "Address length exceeds 25 bytes"
"i55j" -> "Address length less than 4 bytes"</pre>
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
<lang Mathematica>chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; data =
Anonymous user