Home >Backend Development >PHP Tutorial >php encryption program_PHP tutorial
php encryption program
//Encryption
function jiami($data,$psw){
for($i=0,$j=0;$i
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
ord(substr($psw,$j,1));
If ($j > strlen($psw)){
$j=0;
}
$str .=chr($middle);
}
Return($str);
}
?>
I saw a netizen’s encryption program on a website, so I wrote it down.