This is a relatively simple module designed for applications which receive email.
It provides a mechanism for authenticating email requests,
by checking that the To: address,
which should be in the form "username+hash@mydomain.com",
contains the correct hash value for that particular sender.
It uses the sender address and a locally-set secret string to determine the correct hash for the user.
A single AddressHash object may be used for multiple authentication checks within the same system.

Takes four arguments.
They are listed with their defaults.
They are described more fully in the ACCESSORS section.
'secret' - PLEASE set this; the default is stupid on purpose.
'hashlen' - Default is 6.
'prefix' - Default is no prefix.
'hashtype' - Default (and only supported type) is md5.

If you do use a hash prefix,
you may skip setting the 'prefix' variable if you wish,
just realize that you will have to strip the prefix yourself before passing your hash to check_auth,
instead of letting the split_address method (see below) do it for you.

A convenience method.
Takes an email address and returns a reference to a hash containing the keys 'username',
'extension',
and 'domain'.
Returns undef if parsing failed.
This is a fine way to isolate the hash to test against.

The authenticator secret is a string that is used in the hashing algorithm.
It should be set locally in your program.
It should not change too often,
unless you like annoying your users by changing the email address they should use for your program all the time.

The prefix is a fixed string that you expect to appear at the beginning of every email extension received by your application.
You may not need this,
but it is useful if you expect a single email account to be able to run several different programs,
and want to differentiate the requests via something like procmail.
In the above example,
with the prefix set to 'ma',
users should send all requests to an address like myprog+ma38c319@mydomain.com.