[Date Prev][Date Next] [Chronological] [Thread] [Top]

Convert base16 to base64 script here...



If anyone's interested. This is what I have discovered to make the standard
(old?) base16 md5 passwords jive with openldap's base64 method. You will need
the MIME::Base64 module from CPAN.

#!/usr/bin/perl
#
# Converts a base 16 hashed md5 password to base 64 
#
use MIME::Base64;
$orig_encrypted_password = '4B8916F6665C335CA568CC1116653685';
$bin_encrypted_password = pack('H*',$orig_encrypted_password);
$new_encrypted_password = encode_base64($bin_encrypted_password);

print '1. userPassword: ' . $orig_encrypted_password . "\n";
print '2. userPassword: ' . $bin_encrypted_password . "\n";
print '3. userPassword: ' . $new_encrypted_password . "\n";


Best Regards,
E. M. Recio

*********************************************************
* Applied Sociology and Participatory Research          *
* Department of Psychology, Sociology, and Anthropology *
* Drexel University; Philadelphia, PA 19104; USA        *
* Email: <n2wog@usa.net>    ICQ: <458042>               *
* Homepage: < http://polywog.navpoint.com >             *
*********************************************************


____________________________________________________________________
Get free email and a permanent address at http://www.amexmail.com/?A=1