Heim > Artikel > Backend-Entwicklung > PHP MD5-Verschlüsselungscode:
<code><span><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><<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><<span>input</span><span>type</span>=<span>"text"</span><span>name</span>=<span>"c"</span> /></span><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>></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></code>
Das Obige stellt den PHP-MD5-Verschlüsselungscode vor, einschließlich des relevanten Inhalts. Ich hoffe, er wird für Freunde hilfreich sein, die sich für PHP-Tutorials interessieren.