logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Digest::MD2 - Perl interface to the MD2 Algorithm

Author

       Gisle Aas <gisle@aas.no>

perl v5.40.0                                       2024-10-20                                           MD2(3pm)

Description

       The "Digest::MD2" module allows you to use the RSA Data Security Inc. MD2 Message Digest algorithm from
       within Perl programs.  The algorithm takes as input a message of arbitrary length and produces as output
       a 128-bit "fingerprint" or "message digest" of the input.

       The "Digest::MD2" programming interface is identical to the interface of "Digest::MD5".

Name

       Digest::MD2 - Perl interface to the MD2 Algorithm

See Also

       Digest::MD5

Synopsis

        # Functional style
        use Digest::MD2  qw(md2 md2_hex md2_base64);

        $digest = md2($data);
        $digest = md2_hex($data);
        $digest = md2_base64($data);

        # OO style
        use Digest::MD2;

        $ctx = Digest::MD2->new;

        $ctx->add($data);
        $ctx->addfile(*FILE);

        $digest = $ctx->digest;
        $digest = $ctx->hexdigest;
        $digest = $ctx->b64digest;

See Also