Authcode () is not a built-in function of PHP. It is a function developed by KANG Sheng that uses exclusive or operations for encryption and decryption. It can be said that this is a major contribution of KANG Sheng to the PHP community in China. KANG Sheng's own products, such as Discuz and UCenter, and many Chinese companies that use PHP use this function for encryption. In the previous section, inkPHP3.1.2 integrated UCenter details (4), authcode () plays an important role in synchronous login. During synchronous login (from project login to UCenter),
Authcode() It is not a built-in function of PHP. It is a function developed by KANG Sheng that uses exclusive or operations for encryption and decryption. It can be said that KANG Sheng has made a significant contribution to the PHP community in China. KANG Sheng's own products, such as Discuz and UCenter, and many Chinese companies that use PHP use this function for encryption. Previous
ThinkPHP3.1.2 comprehensive UCenter explanation (4)Synchronous login in progress
Authcode() Plays an important role. During synchronous login (from project login to UCenter), authcode () encrypts user login information because unencrypted data is easily intercepted during transmission, in this way, the user information is exposed. The role of authcode () is to provide encryption protection for the transmitted data. When the data arrives at the terminal (UCenter), authcode () decrypts the encrypted data to restore the data.
The following program demonstration gives us a better understanding of authcode () and the principles of synchronous logon.