Bitcoin/address validation: Difference between revisions

m
(→‎{{header|Factor}}: use map-reduce instead of map and reduce)
Line 448:
CONSTANT: ALPHABET "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
 
: base58>bigint ( digitsstr -- n )
[ ALPHABET index ]
[ [ 58 * ] [ + ] bi* ] map-reduce ;
 
: base58> ( str -- nbytes ) base58>bigint 25 >be ;
 
: btc-checksum ( bytes -- checksum-bytes )
Anonymous user