Perl SHA digest

Problem

You want to generate a SHA digest for a given string.



Solution

Perl has great encryption and digesting algorithms.

In the example tab we use the Digest Perl module.



Example


perl -M'Digest::SHA1 qw(sha1_hex)' \
-e '$dig=sha1_hex("my big test"); print "$dig\n";'

419e6139a21f51a3f2ea1a783cfe536a0dada873



Reference

Technorati Tags: , , , ,



Most Viewed


Leave a Reply