search
Homephp教程php手册可解密的md6(think_encrypt和think_decrypt改良版)

一直想要md5那种加密等长,又能解密的对称加密解密方法,于是有了md6。
第一步,去OT扣来think_encrypt和think_decrypt函数。
第二步,打造自己的md6:function md6($str='',$de=false){<br>     $key=('yourkey');<br>     $char=('MDAwMDAwMDAwM');<br>     if($str!=''){ <br>         if($de){<br>             $str=$char.$str;<br>             $str=think_decrypt($str,$key);<br>         }else{<br>             $str=think_encrypt($str,$key);<br>             $str=str_replace($char, '',$str);<br>         }<br>     }<br>     return $str;<br> }用法举例:function test(){<br>   $str= '';<br>   for($i=1;$i     $str=md6($i);<br>     echo($str.'    |    '.md6($str,true).'<br>');<br>   }<br> }输出结果:IKKdXY | 1<br> IKgdXY | 2<br> IKwdXY | 3<br> IN6dXY | 4<br> IOKdXY | 5<br> IOgdXY | 6<br> IOwdXY | 7<br> IR6dXY | 8<br> ISKdXY | 9<br> IKNeXY | 10 <br> ...<br> <br> IKNebCzdqRv | 10000<br> IKNebCzdqhv | 10001<br> IKNebCzdqxv | 10002<br> IKNebCzdrBv | 10003<br> IKNebCzdrRv | 10004<br> IKNebCzdrhv | 10005<br> IKNebCzdrxv | 10006<br> IKNebCzdsZv | 10007<br> IKNebCzdspv | 10008<br> IKNebCzds5v | 10009<br> IKNebCzhqRv | 10010 <br> ...<br> <br> IKNfbGzhqSpgqh2cg | 11110000<br> IKNfbGzhqSpgqh6cg | 11110001<br> IKNfbGzhqSpgqh-cg | 11110002<br> IKNfbGzhqSpgqiCcg | 11110003<br> IKNfbGzhqSpgqiGcg | 11110004<br> IKNfbGzhqSpgqiKcg | 11110005<br> IKNfbGzhqSpgqiOcg | 11110006<br> IKNfbGzhqSpgqiYcg | 11110007<br> IKNfbGzhqSpgqiccg | 11110008<br> IKNfbGzhqSpgqigcg | 11110009<br> IKNfbGzhqSpgrh2cg | 11110010 4-6位数(数字和英文)加密后的密文长度为:11,
7-9位数(数字和英文)加密后的密文长度为:17,



在一定范围内加密出来的密文是等长的,有什么作用就自己去发挥吧,我只能帮到这里了!

AD:真正免费,域名+虚机+企业邮箱=0元

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

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.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment