浅谈discuz密码加密的方式_PHP
discuz注册时,会把密码按一个规则加密。
比如我的密码是123456
复制代码 代码如下:
echo md5("123456");
会输出:
复制代码 代码如下:
e10adc3949ba59abbe56e057f20f883e
而数据库的值却为:
复制代码 代码如下:
7839dc9437013b5c11a5d86e9b8350e9
注意到:
有个叫salt的字段,其值为:d82a35
其实这是一个随机的字符串。
第一次md5后的值再加上盐值(salt)再进行md5,就是要得到的值了。
试一下
复制代码 代码如下:
echo md5(md5('123456').'d82a35');
这回结果是:7839dc9437013b5c11a5d86e9b8350e9,是对的。
在php5.5之前的版本,并没有很好的加密机制。这是个不错的方式。已经大大地加强了密码的安全性了。
而php5.5中有更为可靠和方便的加密方式。喜欢钻研的朋友可以了解一下:
password_hash()
http://www.php.net/manual/zh/function.password-hash.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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

A must-have for Discuz users! Comprehensive analysis of renaming props! In the Discuz forum, the name change function has always received much attention and demand from users. For some users who need to change their name, name change props can easily modify the user name, and this is also an interesting way of interaction. Let’s take an in-depth look at the renaming props in Discuz, including how to obtain them, how to use them, and solutions to some common problems. 1. Obtain name-changing props in Discuz. Name-changing props are usually purchased through points or the administrator

Discuz Editor: An efficient post layout tool. With the development of the Internet, online forums have become an important platform for people to communicate and share information. In the forum, users can not only express their opinions and ideas, but also discuss and interact with others. When publishing a post, a clear and beautiful format can often attract more readers and convey more accurate information. In order to facilitate users to quickly type and edit posts, the Discuz editor came into being and became an efficient post typesetting tool. Discu

"Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

Detailed explanation of the steps to modify the Discuz domain name. Specific code examples are required. With the development and operation of the website, sometimes we need to modify the domain name of the Discuz forum. This may be due to brand change, website SEO optimization, or other reasons. No matter what the reason is, modifying the Discuz domain name is a process that requires careful operation. Today we will introduce the steps of modifying the Discuz domain name in detail and provide specific code examples. Step 1: Back up data. Before modifying the domain name, you must first ensure that the website

In the Discuz forum, the navigation bar is one of the parts that users often come into contact with when visiting the website. Therefore, customizing the navigation bar can add a unique personalized style to the forum and improve the user experience. Next, we will introduce how to personalize the navigation bar in the Discuz forum and provide specific code examples. First, we need to log in to Discuz's backend management system and enter the "Interface" -> "Navigation Settings" page. On this page, we can perform various settings and customizations on the navigation bar. Here are some

Discuz Forum Hot Post Setting Guide With the rapid development of the Internet, the forum, as an important online community platform, plays an important role in connecting users, sharing information and exchanging opinions. In the Discuz forum, hot posts are one of the important ways to attract users and increase forum activity. By setting hot posts, administrators can display high-quality content at the top, stimulate users to participate in discussions, and increase the exposure and click-through rate of posts. This article will introduce how to set up the hot post function in the Discuz forum and provide specific code examples.

The editor will introduce to you three methods of encryption and compression: Method 1: Encryption The simplest encryption method is to enter the password you want to set when encrypting the file, and the encryption and compression are completed. Method 2: Automatic encryption Ordinary encryption method requires us to enter a password when encrypting each file. If you want to encrypt a large number of compressed packages and the passwords are the same, then we can set automatic encryption in WinRAR, and then just When compressing files normally, WinRAR will add a password to each compressed package. The method is as follows: Open WinRAR, click Options-Settings in the setting interface, switch to [Compression], click Create Default Configuration-Set Password Enter the password we want to set here, click OK to complete the setting, we only need to correct

Sharing how to modify Discuz user ID, easy to do, specific code examples are required. In the Discuz forum system, the user ID is a unique number that identifies the user, which is usually automatically generated by the system. But in certain circumstances, such as needing to migrate users from one system to another, or needing to manually modify the user ID to meet business needs, we may need to modify the user ID. This article will share a method to modify the Discuz user ID and provide specific code examples to help you solve this problem easily. Modify Di
