Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Notice: Uninitialized string offset: 63 in [...][...] on line 18
- Notice: Uninitialized string offset: 63 in [...][...] on line 19
- $tmp = md5(md5($key.$strofsym[$x-1]).$key);
- $encoded = str_replace($tmp[3].$tmp[6].$tmp[1].$tmp[2], $strofsym[$x-1], $encoded);
- function encode($unencoded,$key){ //Шифрование
- $string=base64_encode($unencoded);
- $newstr = '';
- $arr=array();
- $x=0;
- while ($x++< strlen($string)) {
- $arr[$x-1] = md5(md5($key.$string[$x-1]).$key);
- $newstr = $newstr.$arr[$x-1][3].$arr[$x-1][6].$arr[$x-1][1].$arr[$x-1][2];
- }
- return $newstr;
- }
- function decode($encoded, $key){ //Расшифровка
- $strofsym='qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM=';
- $x=0;
- while ($x++<= strlen($strofsym)) {
- $tmp = md5(md5($key.$strofsym[$x-1]).$key);
- $encoded = str_replace($tmp[3].$tmp[6].$tmp[1].$tmp[2], $strofsym[$x-1], $encoded);
- }
- return base64_decode($encoded);
- }
- echo decode('70072bbbd45b597a700751f437683768','z');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement