一段php加密解密的代码

1   
2$key = "This is supposed to be a secret key !!!";   
3  
4function keyED($txt,$encrypt_key)   
5{   
6$encrypt_key = md5($encrypt_key);   
7$ctr=0;   
8$tmp = "";   
9for ($i=0;$i

<strlen($txt);$i++) "original="" $ctr="0;" $ctr++;="" $dec_text="decrypt($enc_text,$key);" $enc_text="encrypt($string,$key);" $enc_text,="" $encrypt_key="md5(rand(0,32000));" $i++;="" $md5="substr($txt,$i,1);" $md5);="" $string="" $string,="" $tmp="" $tmp.="(substr($txt,$i,1)" $tmp;="" $txt="keyED($txt,$key);" ($ctr="strlen($encrypt_key))" ($i="0;$i&lt;strlen($txt);$i++)" (substr($txt,$i,1)="" .="" :="" ;="" <br="" ^="" and="" decrypt="" decrypt($txt,$key)="" encrypt="" encrypt($txt,$key)="" encrypted="" for="" function="" if="" in="" it="" keyed($tmp,$key);="" print="" return="" srand((double)microtime()*1000000);="" store="" substr($encrypt_key,$ctr,1));="" substr($encrypt_key,$ctr,1);="" text="" the="" {="" }="">\n";
print "Encrypted text : $enc_text <br/>\n";
print "Decrypted text : $dec_text <br/>\n";

Published At
Categories with Web编程
Tagged with
comments powered by Disqus