[ph-perl] convertion of ns-mta-md5

Top Page
Author: ph-perl Mailing List
To: ph-perl
Subject: [ph-perl] convertion of ns-mta-md5
Question for math gurus

I'm migrating a mail server using a ns-mta-md5 hashing algorithm for the
password. Could I convert this to a standard md5 hash without knowing
the password.

The hash is of the form

my $ns_mta_md5 =

The first 32 is the hash, the last 32 is the salt.

The formula for getting the hash is:

my ($hash, $salt) = unpack('a32 a32', $ns_mta_md5);
my $h = Digest::MD5::md5(pack('a* C a* C a*', $salt, 89,
    $unknown_password, 247, $salt));

Is there a way of converting the result of the function:

md5(pack('a* C a* C a*', $salt, 89, $unknown_password, 247, $salt));



ph-perl mailing list