# man > Digest::base(3pm)

## NAME
    [Digest::base](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3Abase/markdown) - Digest base class

## SYNOPSIS
      package [Digest::Foo](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3AFoo/markdown);
      use base '[Digest::base](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3Abase/markdown)';

## DESCRIPTION
    The "[Digest::base](https://www.chedong.com/phpMan.php/perldoc/Digest%3A%3Abase/markdown)" class provide implementations of the methods "addfile" and "add_bits" in
    terms of "add", and of the methods "hexdigest" and "b64digest" in terms of "digest".

    Digest implementations might want to inherit from this class to get this implementations of the
    alternative *add* and *digest* methods. A minimal subclass needs to implement the following
    methods by itself:

        new
        clone
        add
        digest

    The arguments and expected behaviour of these methods are described in Digest.

## SEE ALSO
    Digest

