Home > Backend Development > PHP Tutorial > php encryption program_PHP tutorial

php encryption program_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:09:31
Original
925 people have browsed it

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);
}
?>

I saw a netizen’s encryption program on a website, so I wrote it down.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629748.htmlTechArticlephp encryption program?php //encryption 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))...
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template