Search code examples
javapowershellchecksumisosha256

How to compare an Fedora iso download file with its sha-256 checksum text file in Windows using Java?


I wanted to verify the sha256-checksum of the Fedora ISO image I have downloaded with its checksum text file. I have the iso and checksum text file both on a directory. And I followed the Fedora verifying downloaded image (https://docs.fedoraproject.org/en-US/Fedora/22/html/Installation_Guide/sect-verifying-images.html) instructions for Windows and got an error "The file is too long, this operation is currently limited to supporting files less than 2 gigabytes in size" while using Windows8.1 powershell. The ISO image file is 2.165GB size. Is there a Java api or tool available now so that I don't have to reinvent the wheel? I don't have a Linux/


Solution

  • If you are using Powershell 4.0 or greater (which you are since you said you are using Windows 8.1), you can utilize the Get-FileHash cmdlet. Example:

    Get-FileHash -Algorithm SHA256 .\en_visual_studio_enterprise_2015_x86_x64_dvd_6850497.iso