9

Is there any Built-In Checksum utility for Windows 10 using CRC-32? I checked different answers which are old and mention certUtil, but that does not support CRC-32 or CRC-64.

Update: I had also checked Is there a built-in checksum utility on Windows 7?, however, that's an old question and does not specifically asks for CRC-32 and Windows 10 may have support for it now. That's why asking this.

Umair Malhi
  • 191
  • 1
  • 1
  • 5
  • 2
    Possible duplicate of [Is there a built-in checksum utility on Windows 7?](https://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7) – Seth May 09 '19 at 07:08
  • There is no default utility to do this and as you mention `certutil` doesn't support CRC (`certutiil -hashfile -?`). CRC is also a very basic checksum and others might proof to be more reliable depending on what you're doing. – Seth May 09 '19 at 07:09
  • Get-FileHash in powershell but does not support CRC – AtomiX84 May 09 '19 at 08:19
  • @Seth yes I checked that, it also mentions that CRC-32 is not supported. but as I mentioned in question, it's old post so may be now there is support for that. I don't have much idea about checksum though. – Umair Malhi May 09 '19 at 12:05
  • Is there a specific reason you're looking for CRC32? Why use that if you could use MD5 or SHA? – Seth May 09 '19 at 13:15
  • so is that mean if the checksum value is given in CRC32 we can sum how verify it from MD5 or SHA as well? means we don't need to get CRC32 at all on windows? I don't have much idea about how does it work, I think for verifying given CRC32 checksum value, we have to get CRC32 value of a file and match with given value – Umair Malhi May 10 '19 at 10:45

7 Answers7

13

There is a way to get the CRC-32 on Windows (since Win 7):

  1. Right-click the file(s) you wish to get the CRC-32 for and click Send toCompressed (zipped) folder.
  2. Open the ZIP file using Windows Explorer, set the view to details.
  3. Right-click on the detail header and select the CRC-32 column to be visible.
  4. Resize columns so the CRC-32 is visible.
  5. There you go!

Explorer providing CRC-32

  • 1
    Just tried this and it doesn't work (Windows 10) – James Jun 22 '20 at 11:15
  • What doesn't work? I retried this method and it works just as well as it did on win 7. – Taylor Hillegeist Jun 24 '20 at 17:11
  • "CRC-32" is not a column I can enable to view in a .zip details tab on my Win10 machine – James Jun 26 '20 at 12:40
  • Can I ask which version of windows you have? I am using the enterprise edition so perhaps there are functional differences? – Taylor Hillegeist Jul 31 '20 at 17:52
  • Windows 10 Pro user here, not available too – Fusseldieb Sep 01 '20 at 00:56
  • 2
    Works here on Windows 10 1909, not sure what you're doing guys. Of course if you have any archiver handling zip files instead of Explorer, you need to right-clic the file > Open with > Windows Explorer. – Nicolas Melay Sep 11 '20 at 15:06
  • Works (Windows 10 21H2). Note you have to enable the column - its not visible by default. Explorer offers around many columns, most of questionable utility (like `Assistant's phone` and other nonsense). Why didn't Microsoft include `CRC-32` for the standard Explorer view? Then this weird workaround would not be necessary... – AlainD Jul 28 '22 at 13:52
4

7-Zip provides an additional Windows Explorer context menu entry from which checksums can be calculated:

  1. Right-click the file you wish to get the CRC-32 for. A context menu appears.
  2. Select the CRC SHA submenu entry.
  3. Select any of the available algorithms: CRC-32, CRC-64, SHA-1 or SHA-256 to calculate the respective checksum, or select "*" to calculate all of them and additionally BLAKE2sp.
Trudy
  • 149
  • 1
  • 4
2

I opened the .zip with Windows Explorer, the right-clicked the file to show properties in order to see the CRC32 value:

properties

Peregrino69
  • 4,526
  • 2
  • 22
  • 30
1

For Windows 10, I can offer a powershell solution to read RtlComputeCrc32 API on Ntdll.dll.

param (
    [Parameter(Mandatory=$true)]
    [string]$InputFile
)

Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;

public class Win32Api {
    [DllImport("ntdll.dll")]
    public static extern uint RtlComputeCrc32(uint dwInitial, byte[] pData, int iLen);
}
"@

# Read the file as bytes
$fileBytes = [System.IO.File]::ReadAllBytes($InputFile)

# Calculate the CRC32 checksum using the Win32 API
$crc32 = [Win32Api]::RtlComputeCrc32(0, $fileBytes, $fileBytes.Length)

# Convert the CRC32 value to hexadecimal string
$crc32String = $crc32.ToString("X8")

# Display the CRC32 checksum
Write-Output "CRC32: 0x$crc32String"
#Just to keep Powershell window open. Remove this line for non-interactive usage.
pause

Save this script as a file like crc32.ps1 You can run on windows console as

Powershell -ExecutionPolicy Bypass -File crc32.ps1 -InputFile SomeFile.bin
Cem Polat
  • 11
  • 2
1

Wrapped the code from Cem Polat into a function. It's working fine and fast! Thanks Cem!

Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;

public class Win32Api {
    [DllImport("ntdll.dll")]
    public static extern uint RtlComputeCrc32(uint dwInitial, byte[] pData, int iLen);
}
"@

function Get-CRC32 {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory=$true,ValueFromPipeline = $true)]
        [string]$InputFile
    )
    Write-host $InputFile
    # Read the file as bytes
    $fileBytes = [System.IO.File]::ReadAllBytes($InputFile)

    # Calculate the CRC32 checksum using the Win32 API
    $crc32 = [Win32Api]::RtlComputeCrc32(0, $fileBytes, $fileBytes.Length)

    # Convert the CRC32 value to hexadecimal string
    $crc32String = $crc32.ToString("X8")

    # Display the CRC32 checksum
    Write-Output $crc32String
}
LawF0rge52
  • 11
  • 1
0

OpenHashTab is nice tools recomended as do the job https://github.com/namazso/OpenHashTab/releases/tag/v3.0.4 enter image description here

user956584
  • 356
  • 4
  • 13
-1

On my side it works, but you MUST be in the ziped folder via the windows explorer. Then, once inside, you can see the CRC-32 column option.

Benoit
  • 1