Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encryption with SHA-1...did i do correctly?

Status
Not open for further replies.

spewn

Programmer
May 7, 2001
1,034
i'm trying to encrypt and email using SHA-1.

here's my code:

Code:
#!/usr/bin/perl
use CGI qw(:standard);
use Digest::SHA1 qw(sha1_hex);

$cgi = new CGI;

$x='test@mail.com';
$epassnew=sha1_hex($x);

print $cgi->header();

print $epassnew;

this definitely gives me a value, that appears encrypted. did i do this code right?

thanks!

- g
 
Isn't that going to just give you the sha1 hash? I don't think it's really encrypting it is it?

Look at the Crypt modules.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top