When exchanging information on computer networks or through portable media, the question arises of how to check the integrity of the transmitted information. After all, if several bits are incorrectly stored in the received multi-megabyte file, this can lead to problems when using this file. Especially if this file is an application. Therefore, when distributing various installation files, and other information, it is customary to indicate a checksum (hash) - so that users, having downloaded the data, can independently check the checksums of the files for coincidence with the hash of the downloaded information.

Principles of using checksums

To make a conscious use of the technology, it is useful to understand what a hash is. In the general case, a hash is a set of bits obtained as a result of calculations on information according to a certain algorithm. Distinctive feature such an algorithm is that when changing at least one bit in background information, the hash amount also changes. And at the same time, it is extremely unlikely that a random change of several bits of the incoming information will leave the hash unchanged. Thus, it turns out that the checksum is like a data sheet, after checking with which you can conclude that the data is genuine.

Therefore, the principle of using hashes is quite simple, and consists of two stages:

1. Calculation, storage and publication of the checksum of the original data.

2. Calculation of its value for the copy of the data and reconciliation with the value for the originals.

There are many different hashing algorithms. And accordingly, there are many varieties of hash sums. The most popular among them are CRC32, MD5, SHA-1 etc.

Where are hashes used?

Even those users who do not know what hash sums are, still quite often enjoy the benefits of using them - for example, when opening packed files. The fact is that modern archivers add their hashes to packed files. They can be seen by opening the archive using the archiver program.

And accordingly, when unzipping, these hashes are automatically checked. If the archive is damaged, the archiving program will generate an error with a message that the checksums of the files do not match. Therefore, the easiest way to ensure that the files are transferred correctly is to archive them.

Another use for checksums is to use them instead of passwords. When a visitor registers on a site by entering a secret password, the server does not store the password itself, but its hash. Accordingly, if attackers gain access to the server, they will not be able to find out the stored passwords - they simply are not there.

Also, hash-sums are an integral part of torrent trackers. Thanks to this, when downloading files via torrents, 100% integrity of the information transfer is guaranteed. At the same time, the user does not need to somehow control this process. All the necessary operations during the download are carried out by the program (). Of course, if the files have been downloaded for a long time, and you need to make sure that they are not damaged over time, then you can run a re-scan manually. So, for example, in the uTorrent program, there is a special item for this in context menu(which appears when you right-click on the selected torrent).

When using archives and torrents, hashing is performed without user intervention. But since not all files are convenient to archive, and even more so to use torrents when sending information, there is a widespread practice of calculating checksums for an arbitrary set of files. Most often, a hash in the MD5 format is used for this, for which many different programs have been created.

How to create MD5 hash of files using MD5Checker?

Despite the fact that the MD5 algorithm is available in many file managers and utilities, not all of them are convenient to use. Some programs do not know how to check hashes for a group of files. The other part of the programs, although doing this, does not display a report on the scan results in a convenient form - you have to manually scroll through the entire list of files to identify error messages.

The only most convenient program for working with MD5 is the MD5Checker application. You can download the program from official site... Despite the fact that the program has an English-language interface, it is quite simple to use it.

The program is configured by default to hash program files, archives and ISO images. Therefore, if you want to use this application for music and video, then you must first change one single setting - specify a mask for the files with which the program will work. To do this, go to the "Tools / Options" menu item and specify the * symbol in the "Include" field (which means "all files").

After that, you can use the program as usual - now all files in all subfolders will be scanned.

To create an MD5 hash, you need to drag the selected files from the folder into the program window - and the program will automatically start calculating MD5 sums for all selected files and all files in subfolders (matching the mask we specified). The calculated amounts will be displayed in the “Current MD5” column. Now all that remains is to save the obtained values ​​to a file by clicking the "S To" button.

It is important to note that if you save the MD5 file in a folder containing all the files and subfolders we have selected, then the relative paths to them will be saved. This will allow the checksum to be verified in the future even if the files are moved to a different location. Therefore, before saving the file, it makes sense to go to the root of the folder by clicking the appropriate button.

If you open the resulting file in notepad, you can see that the information is stored in it in plain text.

At the same time, you can make sure that the paths to the files are kept relative, i.e. do not contain the drive letter on which they are located. Such an MD5 file can be stored in a folder along with the files, and in the future, on any computer, you can check the integrity of the files in this folder.

How do I check the checksums of files?

To check the checksums of files, you need to restart the program or press the "Clear" button to clear the list of files.

After that, drag the MD5 file into the program window and make sure that a green checkmark appears next to each file. This means that the files are kept safe and sound. If there are a lot of files, then it is more convenient to control using the “Failed” and “Passed” counters in the table header.

You can experiment: rename one of the files, and edit another, making a couple of minor changes. After starting the second check, the program found that one of the files became inaccessible under the original name (marked with a yellow icon), and the checksum of the second file did not match (marked with a red icon). A checksum mismatch indicates that the file has either changed or is damaged.

It should be noted that if you have several folders, each of which contains one or more MD5 files (including in subfolders), then by dragging all these folders into the program window, you can check all files for integrity in one fell swoop. MD5Checker automatically extracts hash values ​​from files with md5 extension found during scanning. This is extremely convenient if large amounts of information are copied or transmitted over the Internet.

Also, if you renamed or moved some files to another location, then you can edit the MD5 file in notepad, indicating there new values ​​for their paths - and then you can use it further to check files.

Outcomes

Hashing technology provides a unique opportunity to control the safety of information. Nowadays, when the number of user files is in the thousands and tens of thousands, convenience in processing hash sums for large amounts of data is needed. This task is successfully handled by the MD5Checker program, with which you can both check checksums and create them for multiple files, regardless of the depth of their nesting in the folder tree.

When downloading programs or games from the Internet to your computer, you may have noticed more than once that in the description of the files of some installation images such an item as "Checksums" or "Hash-sums" is indicated. What is a hash-sum, why is it indicated on sites and how can it be checked?

The hash sum is the result of processing the file data by a hash function. In fact, the hash sum is a personal digital identifier with which you can check the integrity of the copied or downloaded image by comparing it with the hash value of the original file.

But why do you need to check the integrity of the downloaded image if you can see in the download manager or torrent client whether the file has been downloaded or not? The fact is that, unlike most multimedia files, such as photos, audio recordings or films, installation files are much more susceptible to the slightest damage. Therefore, if even small errors occurred during the image loading process, during which only a few bytes of information were lost, you may well have problems installing the system or application from this image.

To avoid such problems, it is best to immediately check the hash value of the downloaded file, comparing it with the value that was indicated in the description on the site from which this file was downloaded. However, find out the hash value of the file using standard tools operating room Windows systems alas, it will not work, so you will have to resort to help third party program... For example, to check the hash, you can install a specialized utility called HashTab.

HashTab is a very simple, user-friendly and lightweight program, and it is also completely free. You can download the HashTab program from the developer's official website at this link: hashtab.ru/.

After installing the HashTab program, it will automatically be built into the standard Windows explorer and you can easily find out the hash sums of absolutely any file on your computer.

In order for you to quickly understand how to work with this program, we will conduct one small experiment. Let's go to the official website Microsoft, to section Windows boot Technical Preview, which is located at windows.microsoft.com/ru-ru/windows/preview-download and download from there trial version the freshly baked operating system Windows 10. In this case, before downloading, we will definitely copy the data of the hash value of the image file, which are indicated on the site.

After the Windows Technical Preview image is downloaded to HDD computer, we will perform a control check for compliance with the checksums of the file posted on the site and the image file we uploaded.

In order to find out the hash-sum of a file, right-click on it and select the item Properties... In the file properties window, go to the tab File hash sums... Here you can read the value of all three hash-sums of the selected file (although you will have to wait while the program calculates the hash value). However, few people will want to manually compare the value of hash sums when it is possible to do it in automatic mode... Just copy the hash value of the original (downloaded from the site) file and paste it into the line Hash comparison.

If the values ​​of both hashes are the same, it means that no errors occurred during the download of the file, and you can safely install this operating system or application from the image. If the hash does not match, then it is better to download this file again, since it is better than reinstalling the system or application a second time later due to problems that may arise both during the installation process and during subsequent work.

Also, using the HashTab program, you can compare the value of the hash sums of two identical files. To do this, you just need to have both of them on the computer or at least on a removable storage device connected to it. To compare the hash sums of two supposedly identical files for identity, open the properties of one of the files on the tab File hash sums, click on the button Compare file and provide the path to the second file. After that, the program will automatically calculate and compare the hash sums of both files.

Still have questions? - We will answer them for FREE in

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 developers software when accessing files. The file is checked against the checksum in order to identify its integrity and match with the specified identifier.

There are several algorithms for calculating the checksum of a file, among which the most famous and widespread 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'll look at how to do this.

Table of contents:

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

Command line in Windows, it 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 the file through the command line, it is enough to enter the following query into the command line:

Certutil -hashfile * file path * * algorithm *

Instead of * path to file *, you must 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 the checksum according to the algorithms: MD2, MD4, MD5, SHA1, SHA256, SHA384, SHA512.

After 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 in supporting more algorithms for calculating the checksum: SHA256, MD5, SHA384, SHA1, SHA512, MACTripleDES, RIPEMD160.

The following command is used to check the hash through the PowerShell utility:

Get-FileHash * file path * | 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 PowerShell calculates the checksum using the SHA256 algorithm by default.

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

Get-FileHash * file path * -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... For example, one of convenient programs able to determine the hash of a file is a HashTab. This is an extremely simple application that can be downloaded from the Internet for free.

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

While browsing the internet or before downloading certain files, you may come across cryptic MD5, SHA-1 and SHA-256 parameters, also known as hash sums. What at first appears to be just a random string of letters and numbers is actually a unique key that allows you to verify the authenticity of files and find out if they have been altered or tampered with.

What are hash sums and what are they for

A hash is the result of cryptographic algorithms designed to create a set of numbers and letters. It is also called "digital fingerprint". Typically, these sets have a fixed length and number of characters, regardless of the size of the input information. For example, “WP” and “WP-SEVEN” will have exactly the same size hash. The length of the sum only depends on which hashing algorithm you are testing. For example, SHA1 will return a sum of 40 characters, and MD5 only 32.

Also, please note that despite the minimal difference between “WP-SEVEN” and “WP-SEVEM”, the hash sums are completely different and have nothing in common. This means that even if someone changes the file even 1 bit (roughly speaking), the end result will get a completely different hash sum. This makes hash a convenient way to authenticate a file. The publisher indicates the original amount, and the user checks the result and compares it with the original.

Hashing is done using various standards. These are often MD5, SHA-1 and SHA-256. All three algorithms work differently, but the concept is the same. We will not introduce here into the principle of operation of each algorithm, since this is very complex information, but we will only give general information required for the average user.

How to check a hash in Windows 10

Any tabletop operating system whether Windows 10, Linux or MacOS has standard mechanisms for checking the hash sums of any files on your disk.

How to find out the hash in PowerShell


PowerShell will give you the hash of your file. By Windows default generates a SHA-265 hash, but you can specify that you need a hash of a different algorithm. To do this, use the following commands:

  • Get-FileHash F: \ Test.txt -Algorithm MD5
  • Get-FileHash F: \ Test.txt -Algorithm SHA1
  • Get-FileHash F: \ Test.txt -Algorithm SHA256
  • Get-FileHash F: \ Test.txt -Algorithm SHA384
  • Get-FileHash F: \ Test.txt -Algorithm SHA512
  • Get-FileHash F: \ Test.txt -Algorithm MACTripleDES
  • Get-FileHash F: \ Test.txt -Algorithm RIPEMD160

How to check the hash sum via the Command Line

A lot of the things you do in PowerShell can be done on the classic command line. Checking the hash via the Command Line is done as follows.


By default, Command Prompt displays hash sum SHA1 , but you can change this by telling the system which hash you want to get. To do this, use the following commands:

  • certutil -hashfile F: \ Test.txt MD5
  • certutil -hashfile F: \ Test.txt MD4
  • certutil -hashfile F: \ Test.txt MD2
  • certutil -hashfile F: \ Test.txt SHA512
  • certutil -hashfile F: \ Test.txt SHA384
  • certutil -hashfile F: \ Test.txt SHA256
  • certutil -hashfile F: \ Test.txt SHA1

How to check a hash via HasTab

HashTab is a great little utility that will make checking hash sums easier. You don't have to enter complex commands every time to check. It will be enough just to go to the file properties, where all the amounts will already be collected.

In addition, HashTab makes it easy to compare the hash sums of two files. To do this, right-click on the first file, select Properties and then open the tab File hash sums... Click on Compare file and provide the path to the second file.

The hash sum of the second file will be displayed in the field Hash comparison, and if the sums match, there will be a green check mark next to the hash icon. If they do not match - a red cross.

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 will not go deep into the topic, I will tell you with an example. simple language that would be clear to everyone!

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. Here you have found an interesting game, read the description and found that the description for the file contains the "Hash-Sum" of the image.

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

As soon as he was convinced that everything was installed and working perfectly, he recognized the "Hash-Sum" of the image and indicated it in the description for the game. Unknowing people ask themselves the question, why did he indicate the hash-sum of the image?

Roughly speaking, 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 easier: 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 set about installing the game. But during the installation process, some errors began to appear, something goes wrong. All signs that the game will not install, as it is needed, or installed, but does not start.

In general, there are similar problems ...

Of course, you can blame the place where you downloaded the file from for all the troubles. They say that the file is not of high quality, there is nothing that doesn’t start, nothing that doesn’t work.

But that may not be the case.
Everything is in order with the system and with the source from which the file was downloaded, everything is in order.

Everything is actually much simpler than it seems. In the process of downloading the file, some errors could occur, or the file was not downloaded to the end, in general, in one word, the file was not fully downloaded to the computer for some reason.

Here, all the troubles come from here!

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

1) If the Hash-Sum is different, then the uploaded file is 100% different from the one posted on the site. This means the downloaded file will not work. You will have to download it again.

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

IMPORTANT! If you swing Windows images then, after downloading, I strongly recommend that you find out the hash-sum and compare it, if the amounts do not match, then it is better to think 100 times whether it is worth installing windows from such an image.

Otherwise, you can get a lot of problems during the installation of the system.

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

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

For this case there is special programs and they are generally easy to use. All you have to do is choose desired file to get its hash amount and compare it with the one that was indicated on the site. It's that simple!

I want to present one of these programs in this post. Program, so to speak, "Own production" I was sitting at my laptop yesterday, and I understand that I kind of missed "Coding" and decided that there will be more hash-sums for one program.

The program interface turned out like this. Buttons turned out without labels, but, for each button there are hints for what it is needed. 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 want 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 other way around, 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 field "Compare with:" paste the hash-sum 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-sum of a file with a large size, the program will freeze for a short time, the system will offer to terminate the program ...

In fact, the program is working and soon it will show the hash sum of the file. And the program hangs, because it needs to be slightly modified, namely to add an "additional thread". In general, do not pay attention to the fact that the "Not responding" program is my errors, it all works exactly!

How does the hash-sum of a file change? (For understanding)

I propose to look at a real example, how the Hash-Sum of a file can change. Let's take a regular text document as an example.

Let's create a file "test.txt" and write any line into it, for example, from 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 very important. It is important that in this case we have the ability to remove 1 byte from the file, or vice versa, add several bytes to the file. A text document (TXT) is perfect for this example.

And so, save the file with the string "123" and look at its Hash-Sum. I got it like that.

MD5: 202CB962AC59075B964B07152D234B70

MD5: 202CB962AC59075B964B07152D234B70

Okay! We save the received "Hash-Sum" Somewhere else. Now we open the file "test.txt" again and add one more character to the line, and as a result we will get the following string "1234". We save this file and recognize its "Hash-Sum" again. Here's what happened.