Hash of the amount. How to check file hash sums? How to find out and compare the Hash Sum of a file

Over time, many computer users, with more detailed acquaintance, wonder about hash sums. They are also called checksums. What is it? What is it for? How are these amounts calculated?

Definition

A specific value is called, which is calculated for the data using special algorithms. The purpose of hash sums is to check the integrity of data during transmission. The most common algorithms for calculation are MD5, CRC32 and SHA-1. Checksums can also be used to compare sets of data for nonequivalence, which is useful for detecting viruses on a computer.

The use of this method has gained popularity due to the fact that verification is easily implemented in digital equipment that works with binary data. It can be analyzed without problems and is excellent for finding errors that are caused by the presence of noise in information channels.

Algorithms for verification

The MD5 algorithm is used not only to check the integrity of data, but also makes it possible to obtain a fairly reliable identifier, which is often used in cases where identical files are found on a computer. Thus, it is not the contents that are compared, but their hash sums.

The CRC32 algorithm is used in archiving programs. It stands for “cyclic redundancy code”.

The SHA-1 algorithm has found application in checking the integrity of data that is downloaded using the BitTorrent program.

Example

For example, a user wants to install an operating system or a game on his computer. He downloads the image and wants to make sure that the integrity of the file is in order and that nothing was lost during transfer. The easiest way to do this is to compare the hash sums of the uploaded file and those provided by the author. If they completely match, then the image contains no errors. Well, if the hash sums of the files are different, you need to download it again, since some kind of failure occurred.

This elementary procedure serves as a preventive measure against incorrect operation and freezes. By doing this, you can be sure that the installation of the operating system, program or game will be correct.

HashTab Program: Checking Hash Sum

This utility is a plugin that is integrated into the operating system and used when needed. It can be downloaded from the official website completely free of charge as an installation file. Installation of the program is intuitive.

After installation, in the properties of each file there will be a new additional tab for calculating the checksum. By default, they will be calculated using the same three algorithms described above.

How to check hash sums? To do this, in the “Comparison” field you need to insert the amount indicated by the author. If the downloaded file has successfully verified its authenticity, a green check mark will appear. Otherwise, the user will see a red cross. In this case, it is recommended to download the file again.

The settings on the “File Hash Sums” tab can be changed by clicking on the corresponding item. A settings window will open where you can set the display of the required checksums for verification and calculation. To make everything clear, it is recommended to tick the checkbox that allows you to display checksums in lowercase characters.

Thus, working with this program is very simple. Even an inexperienced user can figure it out.

MD5 File Checker

This utility is also downloaded from the official website, but it does not require installation. You just need to launch it. It uses the same algorithm for verification. When downloading a file, you need to copy the hash amount of the original to the clipboard, and then paste it into the field for verification. The next step is to select the file that the user wants to test for integrity. After clicking on the “Check” button, you will receive a message with the result of the work, which will tell you whether the checksum of the files matches or the file is damaged and there is no match.

An additional feature of the utility is to calculate the amount using the MD5 algorithm for any file on the computer.

Conclusion

So, the concept of a “checksum” was considered. It became clear what it was used for. For the average user, this is an easy option to check the file for integrity and compliance with the original. Useful utilities for calculating and comparing hash sums have been described. The first is capable of comparing different amounts, and the second only using one algorithm, but does not require installation, which is important if you do not have administrator rights.

If you are going to install an operating system or any other software product, it is recommended that you check the hashes after downloading all installation files. This will save a lot of time and, more importantly, nerves.

Have you ever wondered why such information as “Hash Sum” is indicated? Very often found on torrents. On the one hand, some incomprehensible information, but on the other hand, very useful. Why? I will try to tell you in detail how to find out the hash of a file, how to compare it and why it is so useful.

Let's figure out how to find out the hash of a file and in what cases this hash will be extremely useful for us. I won’t go too deep into the topic, I’ll tell you with an example in simple language so that everyone can understand it!

Why do you need to know the hash sum of a file?

Let's say you decide to download an image of a game from a torrent and have fun. So you found an interesting game, read the description and discovered that the description of the file indicated the “Hash Sum” of the image.

The fact is that the person who posted the game first tested it for functionality on his computer, maybe even on several PCs and on different systems.

Once he was sure that everything was installed and working perfectly, he recognized the “Hash Sum” of the image and indicated it in the description of the game. For those who don't know, this begs the question: why did he indicate the hash sum of the image?

Roughly speaking, then: The hash sum is a unique “Key” of a file that can be used to check the file, that is, its integrity.

To put it even more simply: Then, the hash will allow us to compare two files, the file that was uploaded for download, with the file that was downloaded to our computer.

And why should I compare it? Let's say you downloaded the image and naturally began installing the game. But during the installation process some errors began to appear, something was going wrong. All signs that the game will not install as needed, or it is installed, but does not start.

In general, there are similar problems...

Of course, you can blame all the troubles on the place where you downloaded the file. They say that the file was not of high quality, nothing will run, nothing will work.

But this may not be the case.
Everything is fine with the system and everything is fine with the source from which the file was downloaded.

Everything is actually much simpler than it seems. During the process of downloading the file, some errors could have occurred, or the file was not downloaded to the end, in general, in a word, the file was downloaded to the computer incomplete for some reason.

This is where all the trouble comes from!

We go to the site where we downloaded the file, take the hash amount there, after which we find out the hash of the downloaded file and compare them.

1) If the Hash Sum turns out to be different, then the downloaded file is 100% different from the file that is posted on the site. This means that the downloaded file will not work. You'll have to download it again.

2) If the Hash Sums are the same, then in this case an exact copy of the file was loaded and it will work as expected. You can safely begin installation.

IMPORTANT! If you are downloading Windows images, then after downloading I strongly recommend that you find out the hash sum and compare it; if the sums do not match, then it is better to think 100 times whether it is worth installing Windows from a similar image.

Otherwise, you can get a lot of problems when installing the system.

In general, I think everything is clear, if you have questions, feel free to ask! Okay, we figured out why we need the hash sum of the file we are going to download. Now let's learn how to compare the hash sum to find out whether the file has been completely downloaded or not.

How to find out and compare the Hash Sum of a file.

There are special programs for this matter and, as a rule, they are easy to use. All you need to do is select the desired file to get its hash amount and compare it with the one listed on the site. It's simple!

I would like to present one of these programs in this post. The program, so to speak, “Own production” I was sitting at my laptop yesterday, and I realized that I kind of missed “Coding” and decided that there would be one more program compared to Hash-Sum.

The program interface looks like this. The buttons turned out without labels, but each button has hints about what it is needed for. They appear at the bottom of the program when you hover over the button.

1 – This button will open a dialog box for selecting files.
2 – This button is needed if you need to delete the contents of the fields.
.
4 – This button will close the program.
5 – This button is needed if you need to copy the Hash Sum to the clipboard.
6 – This button is the opposite, insert the Hash Sum for comparison.

To compare hash sums, press the “1” button and select the file that was downloaded. The program will determine its hash sum in md5 encoding, and it will appear in the “Received Hash” field.

Now, in the “Compare with:” field, insert the hash amount specified in the description of the downloaded file. Click the “Compare” button and the program will show the result and the following window will appear:

And one more important point about my program. If you use it, then when you receive a hash of a file with a large size, the program will freeze for a short time, the system will prompt you to terminate the program...

In fact, the program works and soon it will show the hash amount of the file. But the program freezes because it needs to be modified a little, namely to add an “additional thread”. In general, do not pay attention to the fact that the program “Does not respond”, these are my errors, it still works smoothly!

How does the Hash Sum of a file change? (For understanding)

I suggest looking at a real example of how the Hash Sum of a file can change. For example, let's take a regular text document.

Let’s create a file “test.txt” and write any string into it, for example, three characters “123”. Now let’s save the file and see its size, it will be only “3 bytes”.

Since one character weighs only 1 byte and it doesn’t matter what it is, a character or a space.

However, this is not particularly important. The important thing is that in this case we have the opportunity to remove 1 byte from the file, or vice versa, add several bytes to the file. A text document (TXT) works great for this example.

And so, save the file with the line “123” and look at its Hash Sum. For me it turned out to be of such significance.

A hash is an individual unique code that corresponds to a specific unit of information, a mathematically calculated image of a specific file. When a file undergoes any modification, the hash sum of this file changes accordingly.

After downloading files from the Internet, especially ISO disk images of various products, it is a good idea to compare the hash of these files with the one published by the manufacturer of these products in order to determine whether the files have been subject to any changes (introduction of third-party programs, viruses, etc.). d.).

In most cases, information about the hash sums of a file is provided by the developer to the user on the website after describing its characteristics or system requirements.

By checking the hash code, the file is protected from modification. Its verification is especially relevant when downloading operating system disk images not from the manufacturer’s website, but from so-called file exchangers and torrent trackers.

If a checksum mismatch is detected, it is better to think 100 times before using the disk in this way. You may ask, how can you find out the checksum of a file in the Windows operating system?

HASH SUM

I will answer, there is such a small and at the same time free program called HashTab, which is integrated into Windows Explorer and will help you easily determine the hash sum (checksum) of the file you downloaded in order to verify its authenticity and integrity. The program can be downloaded from the official website at:

Http://implbits.com/products/hashtab/HashTab_v6.0.0.34_Setup.exe

where after going to the site you need to click on the “Download Now!” button.

In the field that appears, enter your email address, to which an email will be sent with a link to download the program, and click the “Send Download Link” button.

We check the mail and see a letter that provides the URL where we can download the program, the size of the program and its checksum.

Download the program, specifying the folder.

Extract the program installer from the archive and launch it by double-clicking the left mouse button. In the installer window that opens, click on the “Next” button.

In the next window, we agree to the license by clicking on the “I Agree” button.

Select the folder to install the program (it’s better to leave it as default) and click the “Install” button.

We complete the installation by clicking the “Finish” button.

CHECK SUM

Upon completion of installation, the program is integrated into the context menu of the operating system Explorer. To display the checksum of a file, we need to right-click on it and click on “Properties”.

In the window that opens, click on the “File hash sums” tab.

For large files, you may need to wait a few seconds for the hash calculation to progress.

Upon completion of the calculation, in the “Hash Value” window we will see the checksum for the file.

In the “Settings” of the program, you can add additional hash sums displayed and configure it in more detail (I leave it at default).

In order to compare the checksum of a disk image (in my case), I go to the official website and look for where the hash sum of the image is indicated (on the site I find the posted file “MD5SUMS”).

I open this file and look for the checksum for my disk image (this is ubuntu-12.10-desktop-i386.iso).

I copy it from the site.

I paste it into the “Hash Comparison” field in the “File Hash Sum” tab of my disk image and see a green checkmark indicating that the checksum of the file completely matches the checksum of the disk image on the official website.

You can check the hash sum of 2 files in another way by clicking on the “Compare file” button, selecting the file we need in Explorer and clicking on the “Open” button, and look at the result.

In this way we try to protect ourselves from using modified versions of files.

Each file has its own unique value that can be used to validate the file. This value is called a hash or checksum. It is often used by software developers when accessing files. The file is verified using the checksum to determine its integrity and matches the specified identifier.

There are several algorithms for calculating the checksum of a file, among which the most famous and common are MD5, SHA256, SHA1, SHA384. You can calculate the hash of a file, that is, its checksum, using both standard Windows tools and third-party services. In this article we will look at how to do this.

Table of contents:

How to find out the hash of a file via the command line

The command line in Windows allows you to perform various actions, both with the system itself and with individual files. Through it, you can determine the checksum of files using the built-in CertUtil utility.

To find out the hash of a file via the command line, just enter the following query into the command line:

Certutil -hashfile *path to file* *algorithm*

Instead of *path to file* you need to enter the full path to the file. For example: d:\8.jpg

Instead of *algorithm* you need to enter the name of the algorithm by which you want to calculate the checksum. The CertUtil utility can calculate a checksum using the following algorithms: MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512.

By executing the specified command, you will be able to see the file hash calculated using the CertUtil utility.

How to find out the hash of a file using the PowerShell utility

Another utility built into Windows that can determine the checksum of a file is PowerShell. It differs from CertUtil by supporting a larger number of algorithms for calculating the checksum: SHA256, MD5, SHA384, SHA1, SHA512, MACTripleDES, RIPEMD160.

To check the hash through the PowerShell utility, use the following command:

Get-FileHash *path to file* | Format-List

Instead of *path to file* you must specify the full path to the file whose checksum is being checked.

It is important to note that by default the PowerShell utility calculates the checksum using the SHA256 algorithm.

If you want to use a different algorithm, you must specify this in the command when executing the request. For example, to determine a hash using the MD5 algorithm, you will need to run the command:

Get-FileHash *path to file* -Algorithm MD5 | Format-List

Instead of MD5, you can specify other algorithms supported by the utility.

How to find out the hash of a file using the HashTab utility

In addition to Windows tools, you can use third-party applications to determine the checksum of a file. For example, one handy program that can determine the hash of a file is HashTab. This is an extremely simple application that can be downloaded for free from the Internet.

After downloading the HashTab program and installing it, a new tab is created in the file properties, which is called “File Hash Sums”. In this tab you can see the checksum calculation for a file in various algorithms.

In some situations, it may be necessary to calculate the MD5 hash for a file that you have downloaded to your computer. For example, to be sure that you downloaded exactly the file you wanted and the attacker did not modify it. In this article we will look at 2 different ways to do this: through an extension for Explorer, and also through the command line.


There is a great program for Windows Explorer called Hashtab that is free for non-commercial use. You can download it from . Select the free version and click on the "Download" button.

After installing the program, a new tab “File hashes” will appear in the Explorer context menu. By selecting it, the program will automatically calculate hashes for the selected file depending on which algorithms are selected in its settings.

Command line option (with program installation)

If we need to calculate the hash amount of a file via the command line, we can use a utility from Microsoft, which is suitable just for such cases. Download it from and install it. To do this, you will need to create a folder on your hard drive and specify it during the installation process. In our example, the program was installed in the C:\Program Files (x86)\FCIV folder. In order to calculate the MD5 hash of a file, we need to launch the command line and type the following command in it:

"C:\Program Files (x86)\FCIV\fciv.exe" -md5 C:\Users\Admin\Downloads\HashTab_v6.0.0.34_Setup.exe

As you can see, the MD5 hash sum is the same for both the first and second options.

"C:\Program Files (x86)\FCIV\fciv.exe" is the path to the fciv.exe file
-md5 - specifying the algorithm by which fciv.exe will calculate the hash sum
C:\Users\Admin\Downloads\HashTab_v6.0.0.34_Setup.exe - path to the file for which we calculate the hash sum.

Command line option (without installing programs)

If you do not want to install any programs, you can get by with the built-in Windows tools; for this you can use the CertUtil utility.

To check the MD5 hash, just enter the following command:

Certutil -hashfile C:\Users\Admin\Downloads\HashTab_v6.0.0.34_Setup.exe MD5

C:\Users\Admin\Downloads\HashTab_v6.0.0.34_Setup.exe- this is the path to the file whose hash we want to calculate.

As you can see in the screenshot, the hash of our file is 62130c3964... is completely identical to the one we obtained using the first and second methods.



Rate this article

Other articles:

  • An authentication error occurred. The specified function is not supported.…