I found a solution for php: <br>$str = rtrim (base64_encode (pack ('H*', md5 ('123456'))), '=');<br><br>This returns the desired string in 22 characters, rtrim used for discarding trailing '=' pad characters. <br>
<br>Thanks for the help.<br><br><div class="gmail_quote">2010/11/20 Paul <span dir="ltr"><<a href="mailto:paul.a@aandc.org">paul.a@aandc.org</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="im">
At 07:01 AM 11/20/2010 -0500, Chris Nighswonger wrote:<br>
</div><blockquote type="cite"><div class="im">2010/11/20 Altaf Mahmud
<<a href="mailto:altaf.mahmud@gmail.com" target="_blank">altaf.mahmud@gmail.com</a>><br>
</div><div class="im"><dl>
<dd>Hi,<br>
</dd><dd>I want to know how Koha saves its borrowers' password in database? Is
it one-way conversion? For example, if a password is saved as
'4QrcOUm6Wau+VuBX8g+IPg', can I decode it back to its original text which
was '123456'?<br>
</dd></dl></div><div class="im">They are stored as MD5 hashes and you cannot "decode" them
as such. IIRCC, what you must do is make an MD5 hash of the password and
then compare the two hashes. They should be the same.</div></blockquote><br>
The above is not a "pure" MD5 hash [32 character hexadecimal
value]; for 123456, it would be<br><br>
e10adc3949ba59abbe56e057f20f883e<br><br>
However, the decrypt function at
<<a href="http://www.cmd5.org/" target="_blank">http://www.cmd5.org/</a>>
does return 123456 for 4QrcOUm6Wau+VuBX8g+IPg <br><br>
Best - Paul<br>
</div>
<br>_______________________________________________<br>
Koha mailing list <a href="http://koha-community.org" target="_blank">http://koha-community.org</a><br>
<a href="mailto:Koha@lists.katipo.co.nz">Koha@lists.katipo.co.nz</a><br>
<a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Altaf Mahmud<br>System Programmer<br>Ayesha Abed Library<br>BRAC University<br>Bangladesh.<br><br>