Share a DES encryption and decryption PHP class, obtain the physical address, encrypt the plain text information, decrypt the cipher text, save the cipher text to a file, obtain the MAC address of the server, execute the ipconfig command under the windows server, Linux Execute the ifconfig command on the server.
First step: Download the DES encryption and decryption PHP class library we need to use in this lesson: http://www.php.cn/xiazai/leiku/673
Step 2: After the download is completed, find the php class file, extract it to the local server, and create a new php file!
Step 3: We call this class in this new file and instantiate this class:
<?php include_once "code3.php"; //引入类文件 $code=new authCode(); //实例化 //加密 $code->encode("~!@#$%^"); //解密 echo $code->decode("~!@#$%^"); ?>
The running results are as shown below:
#
The above is the detailed content of DES encryption and decryption php code sharing. For more information, please follow other related articles on the PHP Chinese website!