ip校验和 tcp校验和
checksum
is a function used to calculate some value for given data. As we see check is used to check given data with the calculated sum. Data may be little or very big like 1 MB, 10 MB, etc. but the checksum value will be the same size but different for each different type of data. the checksum is also called hash values.
checksum
是用于计算给定数据的某些值的函数。 如我们所见,check用于检查给定数据与计算出的总和。 数据可能很小或很大,例如1 MB,10 MB等,但是校验和值将是相同的大小,但是对于每种不同类型的数据而言都是不同的。 校验和也称为哈希值。
校验和算法 (Checksum Algorithms)
There are a lot of algorithms used to calculate checksum or hash of given data. We can use following algorithms to calculate checksum.
有很多算法用于计算给定数据的校验和或哈希。 我们可以使用以下算法来计算校验和。
MD5
is the most popular checksum algorithm but it is currently assumed as insecureMD5
是最流行的校验和算法,但目前被认为不安全LM
is Windows operating system based check algorithm which is used to calculate password checksumLM
是基于Windows操作系统的校验算法,用于计算密码校验和NTLM
is an older version of theLM
NTLM
是LM
的旧版本SHA1
is the generation and update of theMD5
SHA1
是MD5
的生成和更新SHA256
provides longer checksum value thanSHA1
and more secure.SHA256
比SHA1
提供更长的校验和值,并且更安全。
Check algorithms generally used for data integrity and security. For example, a data part is checksum is calculated and data is traveled over the network and this data may be corrupt. To Be sure the data checksum is calculated again and controlled with provided checksum.
通常用于数据完整性和安全性的检查算法。 例如,计算校验和的数据部分,数据通过网络传输,并且该数据可能已损坏。 为确保再次计算数据校验和并使用提供的校验和进行控制。
Linux OpenSSL的校验和示例 (Checksum Example For Linux OpenSSL)
There is a lot of different checksum tool which can be used for calculation. We can use OpenSSL in Linux operating system. In this example, we will calculate the checksum of the file named phpinfo.php file which contains some PHP code. We will provide sha1
option to the openssl
command.
有很多不同的校验和工具可用于计算。 我们可以在Linux操作系统中使用OpenSSL。 在此示例中,我们将计算名为phpinfo.php的文件的校验和,该文件包含一些PHP代码。 我们将向openssl
命令提供sha1
选项。
$ openssl sha1 phpinfo.php
Windows的校验和示例 (Checksum Example For Windows)
Windows also provide a checksum tool named certutil.exe natively. This tool can be used to calculated certificates and etc. too. We can use this tool to calcualte MD5 checksum of a given file like below.
Windows还本机提供了一个名为certutil.exe的校验和工具。 该工具也可以用于计算证书等。 我们可以使用此工具来计算给定文件的MD5校验和,如下所示。
> CertUtil -hashfile '.\Users\İsmail Baydan\Downloads\genymotion-2.12.1-vbox.exe' MD5
翻译自: https://www.poftut.com/what-is-checksum-and-related-tools-with-calculation-examples/
ip校验和 tcp校验和