invalid_logic has asked for the wisdom of the Perl Monks concerning the following question:

How do I utilize SHA-2 family with PERL?

I tried installing Digest::SHA2, big mistake, it doesn't compile, and the LiveCD kernel paniced. :o

What about SHA-3, did they pick one yet?

Replies are listed 'Best First'.
Re: SHA-2 and PERL
by davido (Cardinal) on Aug 05, 2012 at 04:41 UTC

    You tried to install it without reading the POD?

    DEPRECATED ^

    This module has numerious known bugs, is not compatable with the Digest interface and its functionality is a subset of the functionality of Digest::SHA (which is in perl core as of 5.9.3).

    Please use Digest::SHA instead of this module in new and old code.

    For some purposes, Authen::Passphrase and its companions may be a good choice too. But Digest::SHA is pretty comprehensive.


    Dave

      SHA-2 is the name given to a family of hash functions: SHA-224, SHA-256, SHA-384 and SHA-512. All four of those hash functions are implemented by Digest::SHA (which also implements SHA-1).

      As of Perl 5.10, Digest::SHA is bundled with Perl itself.

      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

        Then it is just a simple misunderstanding of what I was reading about the various SHA digests and their family groupings.

        "SHA-1 produces a 160-bit hash."

        -Bruce Schneier blog/archives/2005/02/cryptanalysis_o.html