Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Would Like Recommendation for an SHA256 module

by TheEnigma (Pilgrim)
on Aug 01, 2006 at 21:41 UTC ( [id://565089]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://565089]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found