From: Neil W. <ma...@wa...> - 2003-11-14 20:16:08
|
On Wed, Nov 05, 2003 at 01:56:53PM -0500, Neil Watson wrote: >Please cosider this snippet: > ># encrypts password using ># SHA-1 algorithm >my $sha1 = Digest::SHA1->new; > ># reset algorithm >$sha1->hexdigest; > ># encrypt >$passwd = 'password'; >$salt = 1658087940; >my $secret = $sha1->sha1_hex($passwd . $salt); > >Run as part of a perl shell script the hash returned for $sercret is the >same each time $passwd and $salt are the same. However, when I insert >the code into a Mason page, on the same machine, the hash returned is >different every time even if $passwd and $salt are the same. Does anyone >know why this is happening? Haven't seen any feedback to this. Is this user error or a bug? -- Neil Watson | Gentoo Linux Network Administrator | Uptime 12 days http://watson-wilson.ca | 2.4.22-ac1 AMD Athlon(tm) MP 2000+ x 2 |