Maison  >  Article  >  développement back-end  >  php MD5加密代码:

php MD5加密代码:

WBOY
WBOYoriginal
2016-08-08 09:29:561280parcourir

<code><span><span>body</span><span>style</span>=<span>"color:green;font-size:28px;background:black;font-family:Verdana, sans-serif;"</span>></span><span><span><?php </span> error_reporting(<span>0</span>);<span>?></span></span><span>form</span><span>name</span>=<span>"c"</span><span>action</span>=<span>"<?php echo $_SERVER['PHP_SELF'];?>"</span><span>method</span>=<span>"get"</span>></span>
Input your text:
<span>input</span><span>type</span>=<span>"text"</span><span>name</span>=<span>"c"</span> /><span>button</span><span>type</span>=<span>"submit"</span><span>value</span>=<span>"Submit"</span><span>style</span>=<span>"color:green;font-size:28px;background:black;"</span>>Creat!<span><span>button</span>></span><span><span>form</span>></span><span><span>body</span>></span><span><span><?php </span><span>//hash encode:</span><span>if</span>(<span>$c</span>=<span>$_GET</span>[<span>'c'</span>])<span>echo</span><span>'Roger!Your MD5 code is:<br>'</span>.md5(<span>$c</span>).<span>'(32bit)<br>'</span>.substr(md5(<span>$c</span>),<span>8</span>,<span>16</span>).<span>'(16bit)'</span>;<span>//截取8到24就是16位的hash,便于储存</span><span>?></span></span></span></code>

以上就介绍了php MD5加密代码:,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn