--- Digest-Hashcash/Hashcash.pm 2003/09/06 22:12:00 1.1 +++ Digest-Hashcash/Hashcash.pm 2003/09/07 00:58:23 1.2 @@ -23,20 +23,60 @@ package Digest::Hashcash; use Time::Local; +use Time::HiRes; require XSLoader; no warnings; -$VERSION = 0.01; +$VERSION = 0.02; XSLoader::load Digest::Hashcash, $VERSION; +=item $secs = estimate_time $size + +Estimate the average time necessary to calculate a token of the given +size. + +See also C. + +=item $size = estimate_size $time[, $min] + +Estimate the size that can be calculated in the given time (which is an +upper bound). The function will not return a size less then C. + +Estimating the time to be used can go wrong by as much as 50% (but is +usually quite accurate), and the estimation itself can take as much as a +second on slower ( value...] =over 4 -=item size => 20 + some +=item size => 18 The number of collisions, in bits. Every bit increases the time to create the token (and thus the cash) by two.