in reply to Re^2: Would Like Recommendation for an SHA256 module
in thread Would Like Recommendation for an SHA256 module

use Digest as a base module

I'm a novice when it comes to modules, so I'm not sure what you mean. Are you suggesting something different than just putting use Digest::SHA or use Digest::SHA::PurePerl at the top of my script? They both say they use the same interface as Digest::

TheEnigma

Replies are listed 'Best First'.
Re^4: Would Like Recommendation for an SHA256 module
by ikegami (Patriarch) on Aug 01, 2006 at 22:11 UTC

    Install Digest and Digest::SHA. Don't use Digest::SHA directly. Use the following code instead:

    use Digest (); my $data = ...; my $hasher = Digest->new('SHA-256'); $hasher->add($data); $hasher->b64digest(); # or ->digest or ->hexdigest