Solker
28.06.2009, 04:50
file_hash = md5.md5(base64.encodestring(file_data).replace('\n ','')[:1024]).hexdigest()
Переведите строку пожалуйста из Python на PHP.
Пробовал такой вариант, но MD5 отличаются.
$test = file_get_contents('test.png');
$test = str_replace("\n",'',$test);
$test = base64_encode($test);
echo md5($test);
Переведите строку пожалуйста из Python на PHP.
Пробовал такой вариант, но MD5 отличаются.
$test = file_get_contents('test.png');
$test = str_replace("\n",'',$test);
$test = base64_encode($test);
echo md5($test);