PHP Encryption Program
Encryption
function Jiami ($data, $PSW) {
For ($i =0, $j =0; $i<>
$middle = Ord (substr ($data, $i, 1)) +
Ord (substr ($PSW, $j, 1));
if ($j > strlen ($PSW)) {
$j = 0;
}
$str. =CHR ($middle);
}
return ($STR);
}
Decrypt
function Jiemi ($data, $PSW) {
For ($i =0, $j =0; $i<>
$middle = Ord (substr ($data, $i, 1))-
Ord (substr ($PSW, $j, 1));
if ($j > strlen ($PSW)) {
$j = 0;
}
$str. =CHR ($middle);
}
return ($STR);
}
?>
This is on a website to see a netizen's encryption program, so write it out.
http://www.bkjia.com/PHPjc/629748.html www.bkjia.com true http://www.bkjia.com/PHPjc/629748.html techarticle PHP encryption program? PHP//Cryptographic function Jiami ($data, $PSW) {for ($i =0, $j =0; $istrlen ($data); $i + +, $j + +) {$middle = Ord (substr ($data , $i, 1) + ord (substr ($PSW, $j, 1)); if ($j strlen ($PSW)) ...