这篇文章主要介绍了php源码分析之DZX1.5加密解密函数authcode用法,实例分析了DZX1.5中authcode函数加密与解密的使用技巧,需要的朋友可以参考下
本文实例讲述了php源码分析之DZX1.5加密解密函数authcode用法。分享给大家供大家参考。具体分析如下:
0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$keyb), 0, 16)) {
return substr($result, 26);
} else {
return '';
}
} else {
return $keyc.str_replace('=', '', base64_encode($result));
}
}
$str = '1234';
$key = '1234';
echo "明文:".$str;
echo "
";
echo "密钥:".$key;
$encode = authcode($str,'11',$key);
echo "
";
echo "加密后的密文:".$encode;
echo "
";
$decode = authcode($encode,'DECODE',$key);
echo "解密后的明文:".$decode;
/*End of php*/
运行结果如下:
明文:1234
密钥:1234
加密后的密文:a52f67eXZGVy0HtQBo4vOREhq3WxnL6E2zlx75JGfoJW
解密后的明文:1234
希望本文所述对大家的php程序设计有所帮助。
,
Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version
Chinese version, very easy to use