Passwords are often saved in md5, and are often in 16-bit binary format md5. md5($str,true) in php can be easily obtained. More often than not, the md5 result is a set of 32 characters. String. I encountered this problem and searched it with a search engine. The search results were various. In fact, the conversion is very simple. I hope it will be helpful to everyone. If it is useful, remember to bookmark it
Passwords are often saved using md5, and are often in 16-bit binary format md5, which can be easily obtained using md5($str, true) in<?php $str = 'test'; $cm = md5($str); $bm = md5($str, true); $cstr = implode(unpack('H*', $bm)); $bstr = pack('H*', $cm); echo 'str:'. $str . "<br >\n"; echo 'cm :' . $cm . "<br >\n"; echo 'cstr:' . $cstr . "<br >\n"; echo 'urlencode(bm) :' . urlencode($bm) . "<br >\n"; echo 'urlencode(bstr):' . urlencode($bstr) . "<br >\n";