Summary of definitions and usage of SHA1 () functions in PHP

Source: Internet
Author: User
Tags crypt sha1 sha1 encryption
PHP cryptographic function-sha1 () function encryption first, let's introduce what is SHA1? SHA is the full name: Secure Hash Algorithm (secure hashing algorithm) is mainly applied to digital signature (digital Signature standard DSS) in the definition of the signature algorithm (digitally Signature Algorithm DSA). For messages that are less than 2^64 bits in length, SHA1 produces a 160-bit message digest. When a message is received, this message digest can be used to verify the integrity of the data. As the data is likely to change during transmission, a different message digest is generated. PHP provides the SHA1 () function using the SHA algorithm! In the previous two articles, "PHP cryptographic function-crypt () function Encryption" and "PHP cryptographic function-md5 () function Encryption", I believe you have a certain understanding of encryption, in this chapter we will continue to introduce the MD5 () function similar to the SHA1 () function algorithm. The syntax format for the SHA1 () function is as follows

1. PHP cryptographic function-sha1 () function Encryption instance usage

Summary: The full name of the SHA is: Secure Hash algorithm (Secure Hash algorithm) is mainly applied to digital signature (digital Signature standard DSS), which is defined in the digitally Signature Algorithm DSA). For messages that are less than 2^64 bits in length, SHA1 produces a 160-bit message digest. When a message is received, this message digest can be used to verify the integrity of the data. As the data is likely to change during transmission, a different message digest is generated. PHP provides the SHA1 () function using the SHA algorithm

2. Using the SHA1 () function to encrypt-php encryption technology

Summary: PHP encryption is similar to MD5 in the SHA algorithm. SHA is all called Secure Hash algorithm (secure hashing algorithm), and the SHA1 () function provided by PHP uses the SHA algorithm

3. PHP Encryption Technology

Introduction:: PHP encryption technology: A few days ago to learn some knowledge of PHP encryption, now summarize some of the PHP encryption form MD5 () encryption algorithm Crypt () encryption algorithm SHA1 () encryption algorithm URL encoding encryption technology BASE64 encoding encryption technology MD5 () encryption algorithm syntax: String MD5 (string $str [, bool $raw _output = false]) $str: The original string is optional (infrequently used

4. How to correctly implement PHP generated unique identifiers _php tutorial

Summary: How to correctly implement PHP generated unique identifiers. What we are going to cover for you today is an example of a code with a unique identifier for PHP generation:? Generates a unique identifier//SHA1 () function, Secure Hash Algorithm (SHA1) Functioncreate_uniq

5. Different solutions for SHA1 encryption results in C # and PHP

Description: Different solutions for SHA1 encryption results in C # and PHP the other day when debugging the API, I found that the results of SHA1 encryption written in C # are not the same as SHA1 () in PHP. I've been looking for a long time. Most of the help documents are provided in PHP when debugging the interface, so there are a lot of problems when implemented in. NET, the most typical is token pass-through verification now provides a SHA1 method that results in PHP.

6. How to correctly implement PHP generated unique identifiers

Summary: How to correctly implement PHP generated unique identifiers. What we are going to cover for you today is an example of a code with a unique identifier for PHP generation:? Generates a unique identifier//SHA1 () function, Secure Hash Algorithm (SHA1) Functioncreate_uniq

7. How do you encrypt your password into a database using PHP?

Introduction: All said MD5 unsafe, seems to be a lot of time to use SHA1 () encryption more secure, and even useful a call bcrypt algorithm, you phper usually how to choose?

8. PHP Self-Learning tutorial PHP encryption function

Introduction: The basic principle of data encryption is that the original plaintext file or data is processed by an algorithm, making it unreadable code, often referred to as "ciphertext", in such a way to achieve the protection of data is not illegal steal and read purposes. The functions of PHP encryption are: Crypt (), MD5 () and SHA1 () functions, as well as encrypted expansion libraries MCrypt and MAS

"Related question and answer recommendation":

The arithmetic problem of Sha1-python multi-byte large number

How do you encrypt your password into a database using PHP?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.