how to check sha256 checksum windows 10
Verifying a SHA256 checksum on Windows 10 is straightforward. It ensures that the file you downloaded has not been tampered with or corrupted. You can do this by using the built-in Command Prompt tool. Open Command Prompt, navigate to the directory containing your file, and use the certutil command followed by the file name. This will generate and display the SHA256 checksum, which you can then compare to the original checksum provided.
This step-by-step guide will walk you through the process of checking a SHA256 checksum on a Windows 10 computer. By the end, you’ll be able to confirm the integrity of any file you download.
Step 1: Open Command Prompt
First, open the Command Prompt on your Windows 10 computer.
You can do this by typing «cmd» in the search bar next to the Start menu and hitting Enter. Alternatively, press Win + R, type «cmd,» and hit Enter.
Step 2: Navigate to the File Location
Once the Command Prompt is open, navigate to the directory containing the file you want to check.
You can do this by typing «cd» followed by the directory path. For example, if your file is in the Downloads folder, type cd Downloads and hit Enter.
Step 3: Enter the certutil Command
Now, use the certutil command to generate the SHA256 checksum.
Type certutil -hashfile filename SHA256 and hit Enter. Replace «filename» with the actual name of your file, including its extension.
Step 4: Compare the Checksums
After running the certutil command, the checksum will be displayed.
Compare this checksum with the one provided by the source from where you downloaded the file. If they match, your file is intact. If not, the file may be corrupt or tampered with.
What Happens Next
Once you’ve checked the SHA256 checksum, you’ll know if your file is secure and unaltered. Matching checksums confirm that the file you have is exactly what was intended by its creator. A mismatch suggests the file could be corrupt or compromised, and you should avoid using it.
Tips for How to Check SHA256 Checksum Windows 10
- Verify Source: Always get the original checksum from a trusted source.
- Check Regularly: For critical files, make it a habit to always check the checksum.
- Be Cautious: If the checksums don’t match, do not use the file.
- Use Shortcuts: Create a batch file to speed up the process if you frequently check checksums.
- Documentation: Keep a record of checksums for important files for future reference.
Frequently Asked Questions
What is a SHA256 checksum?
A SHA256 checksum is a unique string of characters created by a cryptographic hash function, used to verify data integrity.
What is certutil?
Certutil is a command-line tool that’s part of Windows, used for certificate services, and it can also generate checksums.
Is it safe to use Command Prompt?
Yes, using Command Prompt is safe as long as you follow trusted instructions and do not run unfamiliar commands.
Can I use other tools apart from certutil?
Yes, there are third-party tools like HashMyFiles and QuickSFV that can also verify checksums.
What if my checksums don’t match?
If checksums don’t match, do not use the file. It may be corrupt or have been tampered with.
Summary
- Open Command Prompt.
- Navigate to the file location.
- Enter the certutil command.
- Compare the checksums.
Conclusion
Checking the SHA256 checksum on Windows 10 is quick and crucial for ensuring file integrity. By following these simple steps, you can confidently verify that the files you download or receive are safe and unaltered. Always remember to compare the checksum with the one provided by the original source. If there’s a mismatch, it’s a red flag that something might be wrong with the file. For further reading, you might want to explore more about cryptographic hashes and their role in digital security.
So, the next time you download a file, take a few extra seconds to verify its SHA256 checksum. It’s a small step that can save you from potential headaches down the line. Happy computing!
Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.
Read his full bio here.
Проверка контрольной суммы скачанного файла позволяет проверить его целостность и убедиться, что содержимое файла не было изменено. Чаще всего администраторы используют процедуру проверки чексуммы для загруженных дистрибутивов ОС и установочных образов ПО.
Идея контрольной суммы заключается в том, что для оригинального файла выполняется расчет некоего значения (хэша) по определенному алгоритму получения хэш-функции (чаще всего это MD5, SHA1 и SHA256), а пользователи потом могут выполнить такую же проверку для файла, который они скачали. Сравнение этих двух значений хэшей позволяет убедиться, что вы получили не модифицированный оригинальный файл. Если хэши файлов отличаются, значит файл был изменен или поврежден.
Для проверки контрольной суммы файла в Windows можно использовать встроенный PowerShell командлет Get-FileHash или утилиту certutil.
Например, чтобы получить значение хэша ISO образа, выполните команду:
Get-FileHash "F:\ISO\en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso"
Черех некоторое время (расчет может занять некоторое время в зависимости от размера файла), командлет вернет контрольную сумму файла по алгоритму SHA-256 (по умолчанию). С помощью атрибута
-Algorithm
можно задать другой алгоритм вычисления контрольной суммы
-
SHA1 -
SHA256
(по умолчанию) – наиболее популярный алгоритм с наименьшей вероятности возникновения коллизий (когда два разных файла имеют одинаковую контрольную сумму) -
SHA384 -
SHA512 -
MD5
– самый быстрый, но устаревший алгоритм хэширования
Аналогично можно получить хэш сумму файла с помощью certutil.exe:
certutil -hashfile F:\ISO\en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso SHA256
Где получить контрольные суммы оригинальных ISO файлов образов Windows?
Если у вас есть учетная запись Microsoft, вы можете найти контрольную сумму интересующего вас дистрибутива на сайте https://my.visualstudio.com/Downloads/. Для этого не обязательно иметь активную подписку MSDN. Информация о контрольной сумме образа доступна на вкладке с информацией о продукте.
Также список всех оригинальных образов от Microsoft и их хэшей доступен в следующей сторонней онлайн базе https://files.rg-adguard.net/search. В отличии от сайта Microsoft, здесь можно искать сразу по значению хэша. Выполните поиск по полученному хэшу, чтобы убедиться, что вы скачали оригинальный файл образа.
Регистр символов в хэш сумме не имеет значения.
Для автоматизации проверки хэш сумму скачанного образа с оригинальным значением, можно использовать такой однострочник PowerShell:
((get-filehash .\ en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso).hash) -eq "c90a6df8997bf49e56b9673982f3e80745058723a707aef8f22998ae6479597d"
Команда вернет
True
, если контрольная сумма файла совпадает с эталонной.
How to Check File Integrity
SHA256 hash values provide information about the integrity of a file, for example, they can protect against manipulated programs. Unixoid operating systems already have the checksum tools like sha256sum on-board. Windows 10 includes a cmdlet in PowerShell with which the checksums can be quickly checked.
What are checksums
To ensure the integrity of a file, checksums (MD5, SHA256, SHA512, …) are created. A checksum is formed over all bytes of a file (the byte values are multiplied by different numbers according to certain rules.) The value calculated in this way uniquely identifies the file content. If you re-generate the checksum at a later time (or on another computer) and compare it with the first one, you can see whether the file has been modified. This principle is also often used to check whether a file transfer has taken place without errors.
Check SHA256 hash checksum
Checking the hash signature is particularly suitable for downloads. An ISO image or archive file can be checked for integrity and authenticity after downloading. The manufacturers and developers publish signatures with which an image of integrity and authenticity can be compared by means of the SHA256 hash or MD5 hash value. So that the unchanged origin and originality can be ensured without this being the case with a man-in-the-middle attack.
PowerShell Get-FileApply Hash
This example checks the Linux Mint 20 ISO image that was previously downloaded. To verify the integrity of an ISO image, the SHA256 sum is generated and compared, with the SHA256 hash in the sha256sum file.txt,which is also downloaded.
The files linuxmint-20-cinnamon-64bit.iso and sha256sum.txt are copied to a folder, then you open PowerShell and switch to the folder where the cmdlet Get-FileHash is now executed.
Get-FileHash linuxmint-20-cinnamon-64bit.iso -Algorithm SHA256
Algorithm Hash Path
--------- ---- ----
SHA256 2F6AE466EC9B7C6255E997B82F162AE88BFE640A8DF16D3E2F495B6281120AF9 C:\linuxmint-20-cinnamon-64bit
The SHA256 hash of the ISO image is generated.
Then open the previously downloaded file sha256sum.txt which contains the hash. Checksum hash are often referred to as checksum or file fingerprint.
Get-Content sha256sum.txt
2f6ae466ec9b7c6255e997b82f162ae88bfe640a8df16d3e2f495b6281120af9 *linuxmint-20-cinnamon-64bit.iso
As you can see, sha256sum.txt contains the hash string in lowercase, but the hash is calculated by Get-FileHash in uppercase, so that we can then use the hash for the comparison, we convert it from sha256sum.txt to an uppercase string with ToUpper().
$text="2f6ae466ec9b7c6255e997b82f162ae88bfe640a8df16d3e2f495b6281120af9".ToUpper()
Write-Host $text
2F6AE466EC9B7C6255E997B82F162AE88BFE640A8DF16D3E2F495B6281120AF9
The hash string of Get-Content sha256sum.txt is inserted between the quotation marks in $text.
Get-FileHash Parameter -Algorithm
algorithm specifies the cryptographic hash function to use to calculate the hash value from the contents of the specified file or stream. The acceptable values for this parameter are:
- SHA1
- SHA256
- SHA384
- SHA512
- MD5
If no value is specified or the parameter is omitted, the default value is SHA256.
For security reasons, MD5 and SHA1, which are no longer considered secure, and they should only be used for simple change verification, but not to generate hash values for files that need to be protected from attack or tampering.
The procedure can then look like the following in a PowerShell script for this example.
$text="2f6ae466ec9b7c6255e997b82f162ae88bfe640a8df16d3e2f495b6281120af9".ToUpper()
$hash=(Get-FileHash linuxmint-20-cinnamon-64bit.iso -Algorithm SHA256 | Select-Object -Property Hash | ft -HideTableHeaders)
Write-Host $text
Write-Host $hash
The comparison of both hash values with the following line in PowerShell.
[string]$text -eq [string]$hash
Hash Calculate and Compare
The following script calculates the hash value and compares it with Compare-Object and the fingerprint from the signature.
Get-FileHash -Path linuxmint-20-cinnamon-64bit.iso -Algorithm SHA256 | Compare-Object -ReferenceObject "2F6AE466EC9B7C6255E997B82F162AE88BFE640A8DF16D3E2F495B6281120AF9" -DifferenceObject {$_.Hash}
If the checksums match, no output appears.
If the hash values does not match, then both objects are displayed.
Хэш или контрольная сумма файла — короткое уникальное значение, вычисляемое из содержимого файла и обычно использующееся для проверки целостности и соответствия (совпадения) файлов при загрузке, особенно если речь идет о больших файлах (образы системы и подобные), которые могут быть скачены с ошибками или есть подозрения о том, что файл был подменен вредоносным ПО.
На сайтах загрузок часто бывает представлена контрольная сумма, вычисленная по алгоритмам MD5, SHA256 и другим, позволяющая сверить загруженный файл с файлом, выложенным разработчиком. Для вычисления контрольных сумм файлов можно использовать сторонние программы, но есть способ сделать это и стандартными средствами Windows 10, 8 и Windows 7 (требуется версия PowerShell 4.0 и выше) — с помощью PowerShell или командной строки, что и будет продемонстрировано в инструкции.
Получение контрольной суммы файла средствами Windows
Для начала потребуется запустить Windows PowerShell: проще всего использовать поиск в панели задач Windows 10 или меню Пуск Windows 7 для этого.
Команда, позволяющая вычислить хэш для файла в PowerShell — Get-FileHash, а чтобы использовать ее для вычисления контрольной суммы достаточно ввести ее со следующими параметрами (в примере вычисляется хэш для образа ISO Windows 10 из папки VM на диске C):
Get-FileHash C:\VM\Win10_1607_Russian_x64.iso| Format-List
При использовании команды в таком виде, хэш вычисляется по алгоритму SHA256, но поддерживаются и другие варианты, задать которые можно с помощью параметра -Algorithm, например, для вычисления контрольной суммы MD5 команда будет выглядеть как в примере ниже
Get-FileHash C:\VM\Win10_1607_Russian_x64.iso -Algorithm MD5 | Format-List
При этом поддерживаются следующие значение для алгоритмов вычисления контрольной суммы в Windows PowerShell
- SHA256 (по умолчанию)
- MD5
- SHA1
- SHA384
- SHA512
- MACTripleDES
- RIPEMD160
Подробное описание синтаксиса команды Get-FileHash доступно также на официальном сайте https://technet.microsoft.com/en-us/library/dn520872(v=wps.650).aspx
Получение хэша файла в командной строке с помощью CertUtil
В Windows присутствует встроенная утилита CertUtil для работы с сертификатами, которая, помимо прочего, умеет высчитывать контрольную сумму файлов по алгоритмам:
- MD2, MD4, MD5
- SHA1, SHA256, SHA384, SHA512
Для использования утилиты достаточно запустить командную строку Windows 10, 8 или Windows 7 и ввести команду в формате:
certutil -hashfile путь_к_файлу алгоритм
Пример получения хэша MD5 для файла показан на скриншоте ниже.
Дополнительно: на случай, если вам требуются сторонние программы для вычисления хэшей файлов в Windows, можно обратить внимание на SlavaSoft HashCalc.
Если же требуется вычислить контрольную сумму в Windows XP или в Windows 7 без PowerShell 4 (и возможности его установить), вы можете использовать утилиту командной строки Microsoft File Checksum Integrity Verifier, доступную для загрузки на официальном сайте https://www.microsoft.com/en-us/download/details.aspx?id=11533 (формат команды для использования утилиты: fciv.exe путь_к_файлу — результат будет MD5. Также можно вычислить хэш SHA1: fciv.exe -sha1 путь_к_файлу)
Readers help support Windows Report. We may get a commission if you buy through our links.
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Some of our readers have recently requested to know how to verify a checksum on Windows to ensure a file is in good order.
Since there are possibilities of files getting tampered with on the internet by hackers through their nefarious acts, you can verify your MD5 or SHA256 checksum through the steps provided in this article.
Does Windows have a checksum?
Yes, Windows has and makes use of checksum. For those who do not know checksum, it is a short but unique string that results from running an encryption algorithm on a given file.
The algorithm looks through every bit that makes up a file and creates a checksum based on those unique bits. Some of the benefits include:
- Identifies changes in files – You can make sure your file hasn’t been damaged or modified after comparing two checksums.
- Protection for downloaded files – Checksum is a useful way to defend against file corruption or malicious interference in your downloads.
In case you need to quickly and easily verify the checksum or the hash sum of particular software on Windows, it is possible to perform these checks on Windows using certain available tools.
Where is checksum located?
You can locate and make use of checksum on Windows by making use of Certutil. The Certutil is a preinstalled command-line tool that comes with Windows and is a part of Certificate Services which also offers a switch -hashfile that allows you to generate the hash string using a specified algorithm.
The Certificate Services is responsible for request validation per the set policy and the issuance of the certificates.
You can use Windows PowerShell or Command Prompt to run the CertUtil command.
How do I verify a checksum on Windows [MD5 or SHA256]?
1. Use the Windows Command Prompt
- Press the Windows key +R to open the Run window, type cmd in the text field, and press Enter.
- Navigate to the folder that contains the file wherein the MD5 checksum you want to verify is.
- Type cd followed by the path to the folder e.g.:
cd Documents - Next, type this and press Enter.
certutil -hashfile <file> MD5 - Replace the <file> with the filename.
- Wait for it to load, then compare the resulting checksum with what is expected for the software.
You can also look at our detailed guide on adding the run command to the start menu. This will prevent the stress of taking multiple steps before accessing it.
2. Verify checksum by using your File Explorer
- Download HashTab from the developer’s official website, click on the downloaded file, and follow the on-screen instructions to install.
- After installation, right-click on the file you want to run a checksum.
- Then, select Properties from the context menu.
- Locate and click on the tab labeled File Hashes at the top of the window to see the MD5, SHA-1, and CRC32 hashes for your selected file.
- Copy the checksum you want to compare against and paste it into the Hash Comparison dialog box.
- If the hash matches, you will see a green check mark and a red X if it does not match.
- Recent Windows 11 update lets you disable profanity filter in voice typing
- Microsoft wants Windows 10 users to upgrade to Windows 11 or Copilot + PCs
- Windows 11 KB5055627 update makes File Explorer more fluid
3. Use Windows PowerShell
- Click on Start on your Taskbar and type Powershell and select Run as administrator under Windows PowerShell.
- Type the following and add a space:
Get-FileHash - Drag the downloaded ZIP file onto the Windows PowerShell window after the Get-FileHash command. The path after the command should be similar to this:
C:\Users\UserName> Get-fileHash C:\Users\UserName\Downloads\cdq2019s14_Windows.zip - Inspect the calculated hash value while comparing it with the original one. There will be a glaring difference in the checksum, even if there are only a few differences in the underlying file.
You can verify a checksum on Windows using the means provided above. Ensure to follow the steps strictly for optimal results.
Do not hesitate to use the comments section if you have any questions or comments.
Radu Tyrsina
Radu Tyrsina has been a Windows fan ever since he got his first PC, a Pentium III (a monster at that time).
For most of the kids of his age, the Internet was an amazing way to play and communicate with others, but he was deeply impressed by the flow of information and how easily you can find anything on the web.
Prior to founding Windows Report, this particular curiosity about digital content enabled him to grow a number of sites that helped hundreds of millions reach faster the answer they’re looking for.
