This module implements the hashcash hash (or digest, although it's not clearly a digest). For all your information needs please visit http://www.hashcash.org.

One thing to note about this module is that it requires ISO C99 support, both in your compiler and your standard library. If you don't have a compiler that supports ISO C, get gcc at http://gcc.gnu.org/ :)

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 min.

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 (<pentium) machines, but faster machines (1Ghz P3 for example) usually handle it within a hundredth of a second or so.

The estimation will be done only once, so you can call this fucntion as often as you like without incuring the overhead everytime.

A string used to make the token more unique (e.g. the senders address) and reduce token collisions. The string must only contain characters valid for the trial part of the token, e.g. uuencoded, base64 or e-mail-address-parts are useful here.

Checks the given token and returns true if the token has the minimum number of prefix bits, or false otherwise. The value returned is actually the number of collisions, so to find the number of collisions bits specify collisions => 0.

Any additional parameters are interpreted the same way as arguments to new.