Home > Backend Development > PHP Tutorial > PHP encryption and decryption_PHP tutorial

PHP encryption and decryption_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:42:18
Original
1189 people have browsed it

Encryption and decryption is a routine task. The password registered by the user is generally not saved in plain text and must be encrypted first.

Of course the simplest is to call the md5 function in the database sql statement to encrypt the user password. Here we introduce an encryption and decryption class. This class is a useful tool if you want to retrieve a user's original password when he or she forgets it. Of course, this encryption and decryption class can also be used for other purposes.

View source code

PHP encryption and decryption_PHP tutorial __construct( ->skey = hash("md5", , ); safe_b64encode( = ( = ((' +', '/', '='), ('-', '_', ''), safe_b64decode( = (('-', '_'), ('+', ' /'), = () % 4 ( . = ('====', ( encode( (! = = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, = mcrypt_create_iv(, = mcrypt_encrypt (MCRYPT_RIJNDAEL_256, ->skey, , MCRYPT_MODE_ECB, (->safe_b64encode( decode( (! = ->safe_b64decode( = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, = mcrypt_create_iv(, = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, ->skey, , MCRYPT_MODE_ECB, ( } View Code

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/654269.htmlTechArticleEncryption and decryption is a routine task. The password registered by the user is generally not saved in plain text and must be encrypted first. The simplest is of course to call the md5 function in the database sql statement to encrypt the user password...
source:php.cn
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template