X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=Util.pm;fp=Util.pm;h=2b230abbfba893cf619e44dbd40f637d6620afaf;hb=dce01ebc1c99705de3acd1638edf0b9301ddf8cb;hp=f6be1ed9ffdcc428fd363fddc1da06e1a63c1603;hpb=ff0cef885477e3fbf5ad82b0768f66e0e4da13d3;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/Util.pm b/Util.pm index f6be1ed..2b230ab 100644 --- a/Util.pm +++ b/Util.pm @@ -34,28 +34,16 @@ sub CreateKey { sub CreateCryptSalt { # this can create either a DES type salt or a MD5 salt - my $md5 = shift; # do we want a MD5 salt? + # 0 for DES, 1 for MD5 salt and 2 for apache MD5 salt + my $type = shift; my $validstr = './0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; my @valid = split(//,$validstr); my ($in, $out); - my $cryptsaltlen = ($md5 ? 8 : 2); - - open (F, "