Anonymous user
Bitcoin/public point to address: Difference between revisions
Use the .polymod method
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: 'flat' needed before reduce) |
(Use the .polymod method) |
||
Line 335:
>;
sub encode(
[R~] BASE58[ $n.polymod:
}
sub public_point_to_address(
my @bytes
);
my $hash = rmd160 sha256 Blob.new: 4, @bytes.reverse;
my $checksum = sha256(sha256 Blob.new: 0, $hash.list).subbuf: 0, 4;
|