AlexTape has asked for the wisdom of the Perl Monks concerning the following question:
Omniscient Monks,
iīm wondering about the following issue:
kindly perlig
iīm wondering about the following issue:
IMHO this argument should be true.. use Digest::MD5 qw(md5 md5_hex md5_base64); .. # md5 salt my $salt = "any_salt"; #constructor sub new { my ($class) = @_; my $self = $class->SUPER::new(); $self->{_NAME} = $_[1]; $self->{_PASSWORD} = $_[2]; bless $self, $class and return $self; } sub ENCRYPT { return "[" . md5_base64( md5_hex( md5( "[" . $salt . $_[0] ) ) ) . + "]"; } ...
but it isnīt!$user->ENCRYPT("test") eq User::ENCRYPT("test")
each time i execute it, $User->ENCRYPT returns another hash... so what happens?!User::ENCRYPT = [pFEzt3UedzYAtjFwAGLDRQ] $User->ENCRYPT = [TmLr4v17FTUVqcO+Gb2K/Q]
kindly perlig
$perlig =~ s/pec/cep/g if 'errors expected';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Digest::MD5 variation problem?
by Your Mother (Archbishop) on Aug 22, 2013 at 14:28 UTC | |
Re: Digest::MD5 variation problem?
by Corion (Patriarch) on Aug 22, 2013 at 14:25 UTC | |
by AlexTape (Monk) on Aug 22, 2013 at 14:32 UTC | |
Re: Digest::MD5 variation problem?
by zork42 (Monk) on Aug 23, 2013 at 06:31 UTC | |
by AlexTape (Monk) on Aug 23, 2013 at 12:04 UTC | |
by zork42 (Monk) on Aug 24, 2013 at 03:49 UTC | |
by AlexTape (Monk) on Sep 04, 2013 at 11:15 UTC | |
by afoken (Chancellor) on Aug 24, 2013 at 08:37 UTC |
Back to
Seekers of Perl Wisdom