PHP Cryptographic function-sha1 () function Encryption
First of all, 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
Detailed description using the HMAC-SHA1 signature method. Encryption Algorithm: Copy the code using the HMAC-SHA1 signature method: *** @ brief use the HMAC-SHA1 algorithm to generate the oauth_signature signature Value *** @ param $ key * @ param $
Instance
Computes the SHA-1 hash of the string "Hello":
Definition and usage
The SHA1 () function computes the SHA-1 hash of the string.
The SHA1 () function uses the United States Secure Hash algorithm 1.
Explanation from RFC 3174-the US Secure
Simple sha1 encryption function example implemented by PHP and phpsha1 encryption example
This example describes the sha1 encryption function implemented by PHP. We will share this with you for your reference. The details are as follows:
function
MD5 and sha1 are one-way encryption
Algorithm It is often used for password verification and other scenarios requiring encryption operations. In general, developers can write related functions themselves or use their own functions through Delphi or
Today in docking other people's system, found a very pit problem, SHA1 encryption problem
Others system SHA1 encryption is written in PHP, we are C #.
The same is true for string 123456 encryption, C # 's SHA1 encrypted string is
I have been studying base64 and sha1 in Delphi today, using units in cnvcl of http://www.cnpack.org, cnsha1.pas and cnbase64.pas. I am very grateful for the contributions of the cnpack group, we can easily use base64 and sha1 encryption in Delphi,
Copyright statement: original works can be reproduced. During reprinting, be sure to mark them as hyperlinks.ArticleOriginal publication, author information, and this statement. Otherwise, legal liability will be held.
Because of different languages, the rules for encryption are slightly different. Then this problem in the Niang can not search a correct answer, hereby record. 1. First, the two basic algorithms need to be consistent, here are the basic rules of SHA1
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.