使用$_GET恢复md5的加密值


Recover encrypted value with md5 using $_GET

我想使用url将值从php页面传递到另一个页面,值使用md5加密,所以我进入urlhttp://localhost/1.php?id=8f14e45fceea167a5a36dedd4bea2543这就是我想要的,但在我的第二个页面中,当我使用$_GET["id"]时,我看不到值,只有md5值,所以有任何函数可以解密这个md5值吗?非常感谢。

1页:

<script type="text/javascript">
function fn(a)
{  
   var table = document.getElementsByTagName("table")[0];
   //var secondRow = table.rows[a];
   //alert(secondRow.id ); 
    var res=table.rows[a].cells[0].innerHTML;
    alert(res);  
}
</script>
<table class="table " id="tableId">
    <?php 
$i=0;
while ( $i<= 10) {  
echo "
    <tr onclick='"location.href='2.php?id=".md5($i)."''">
    <input type='hidden' name='cid' value='11' />
    <td>$i</td>                          
  </a></tr>";
$i++;
}
 ?>
</table>
</body>

2页:

<?php 
print_r($_GET["id"]) ; //result :8f14e45fceea167a5a36dedd4bea2543 
?>

MD5散列是一种方法,它们无法解密。如果它们能够被解密,世界将节省数十亿美元的存储空间,因为我们可以将一个无限的字符串放入32个字符/字节。不需要太多细节,这就像添加了1+4+5+1+2+3+。。。。并且得到单个数字16。除非我们知道原始值,否则我们实际上无法确定有多少数字加起来构成16,也无法确定原始数字在哪里。

希望这能帮助你理解哈希。