Hello Alex!
The above works fine for me, but to continue the argument, it would mean the following:
Code:
sub comm_encrypt {
# -------------------------------------------------------------------
my ($clear_pass, $salt) = @_;
defined $salt or ($salt = '');
my $enc_pass; ###########################
my $encrypt_method; if ($encrypt_method == ' md5_hex ') {
$enc_pass = md5_hex($clear_pass);
}
elseif { ##################### if ($CFG->{system_store_md5_pass}) {
require GT::MD5::Crypt;
$salt ||= join '', ('a' .. 'z', 'A' .. 'Z', 0 .. 9, '.', '/')[map rand 64, 1 .. 8]; $enc_pass = GT::MD5::Crypt::unix_md5_crypt($clear_pass, $salt);
}
else {
$salt ||= join '', ('a' .. 'z', 'A' .. 'Z', 0 .. 9, '.', '/')[rand 64, rand 64];
$enc_pass = crypt($clear_pass, $salt);
}
return $enc_pass;
}
And the
$encrypt_method == ' md5_hex ' will be defined from Community.conf!