Home >Backend Development >PHP Tutorial >Summary of articles on how to use the encryption extension library

Summary of articles on how to use the encryption extension library

伊谢尔伦
伊谢尔伦Original
2017-06-11 11:52:501439browse

PHP encryption extension library—Mhash extension library What is the Mhash extension library: Mhash is an irreversible PHP encryption extension library based on the principle of discrete mathematics. It is not enabled by default. mhash can be used to create verification values, message digests, message authentication codes, and save key information (such as passwords) without the original text. 1. Mhash extension library installation The installation of the Mhash library is similar to the installation of the Mcrypt extension library. I won’t go into more details here. You can refer to the previous article "PHP Encryption Extension Library—Mcrypt Extension Library"! 2. Mhash extension library constants The Mhash library supports multiple hashing algorithms such as MD5, SHA, CRC32, etc. You can use the mhash_count() and mhash_get_hash_name() functions to output the supported algorithm names. Let’s take a look at the sample code:

1. PHP encryption extension library-Mhash extension library instance usage detailed explanation

Summary of articles on how to use the encryption extension library

Introduction: What is the Mhash extension library: Mhash is an irreversible PHP encryption extension library based on the principle of discrete mathematics. It is not enabled by default. mhash can be used to create verification values, message digests, message authentication codes, and save key information (such as passwords) without the original text.

2. PHP encryption extension library—Mcrypt extension library instance usage

Summary of articles on how to use the encryption extension library

##Introduction: Before starting the main text of this article, let’s first understand what is the PHP encryption extension library: There are not only several encryption functions (md5, crypt, sha1) in PHP, but also There are also some encryption extension libraries with relatively comprehensive functions! Just like PHP does not originally support operating a certain function, but if you want to support it in the new version, you can provide it in an extended way. In this way, when we configure PHP, if we do not use this function, we can prevent PHP from loading. It thus saves server resources and improves its performance.

3. PHP 3DES encryption algorithm implementation

Summary of articles on how to use the encryption extension library

Introduction: What I need to do recently is that php returns a 3des encrypted URL to .net, and then the .net side decrypts it. The implementation of php has never been able to match the .net end. I will write it down here first and hope to see some guidance from experts. There are countless people on the Internet who copy and copy without verifying it personally. I hope everyone can adhere to the rigorous method in the future. Before the PHP encryption extension library Mcrypt encrypts and decrypts data, it first creates an initialization vector, referred to as iv for short. By $iv = mcrypt_create_iv(mcrypt_g...

4. PHP 3DES encryption algorithm implemented

Summary of articles on how to use the encryption extension library

Introduction: What I need to do recently is that php returns a 3des encrypted URL to .net, and then the .net side decrypts it. The implementation of php has not been able to match the .net side. Remember this first, I hope to see some guidance from the experts. Countless people on the Internet have copied it without verifying it personally. I hope you can adhere to the rigorous method in the future. Before encrypting and decrypting data, the PHP encryption extension library Mcrypt was first created. An initialization vector, referred to as iv. By $iv = mcrypt_create_iv(mcrypt_g...

5. mcrypt enables encryption and decryption process detailed analysis_PHP tutorial

Introduction: Detailed analysis of the encryption and decryption process of mcrypt. The Mcrypt extension library can realize the encryption and decryption function, which can not only encrypt plain text but also restore cipher text. 1. PHP encryption extension library. Mcrypt is installed in the standard PHP installation process and Mr

6. Share PHP encryption extension library Mcrypt installation and application skills_PHP tutorial

Introduction: Share the installation and application skills of the PHP encryption extension library Mcrypt. Among them, the Mcrypt extension library can realize encryption and decryption functions, that is, it can encrypt plain text and restore cipher text. 1. PHP encryption extension. The library Mcrypt is installed during the standard PHP installation and is not

7. PHP encryption extension library Mcrypt installation and application examples_PHP tutorial

Introduction: PHP encryption extension library Mcrypt installation and application examples. In php, if we want to use the PHP Mcrypt encryption extension library, we must first install the encryption extension library and then use it, because it is not installed by default like the gd library. mcrypt simplified

8. PHP encryption extension library Mcrypt installation and examples_PHP tutorial

Introduction: PHP encryption extension Library Mcrypt installation and examples. A brief introduction to mcrypt. When PHP programmers write code programs, in addition to ensuring the high performance of the code, another very important point is the security of the program. In addition to PHP since

9. Recently I have to install the encryption extension library Mcrypt, and the environment win7 apache always fails, please help

Introduction: Recently I have to install the encryption extension library Mcrypt, but the environment win7 apache always fails, please help me

10. Usage of php-mcrypt encryption module

Introduction: When PHP programmers write code programs, in addition to ensuring the high performance of the code, there is another very important point, that is, the security of the program. In addition to several of its own encryption functions, PHP also has more comprehensive PHP encryption extension libraries Mcrypt and Mhash. Among them, the Mcrypt extension library can realize encryption and decryption functions, that is, it can not only encrypt plain text but also restore cipher text. The algorithm and encryption mode of the PHP encryption extension library Mcrypt. The Mcrypt library supports more than 20 encryption algorithms and 8 encryption modes. Specifically, you can use the function mcrypt

The above is the detailed content of Summary of articles on how to use the encryption extension library. For more information, please follow other related articles on the PHP Chinese website!

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