{"id":17383084,"url":"https://github.com/iitoneloc/compare-hash","last_synced_at":"2026-04-09T23:04:04.174Z","repository":{"id":211511991,"uuid":"729349688","full_name":"iiTONELOC/compare-hash","owner":"iiTONELOC","description":"It is crucial to verify the integrity of download files. CompareHash provides a means for generating the hash of a file and verifying it in a single command with a straight forward syntax regardless of your OS.","archived":false,"fork":false,"pushed_at":"2024-03-07T22:13:19.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T20:49:09.024Z","etag":null,"topics":["file-hash-value-validation","integrity","linux","macos","powershell-scripts","shell-scripts","windows"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iiTONELOC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-09T01:01:39.000Z","updated_at":"2024-05-10T18:11:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe7e83e1-207e-479a-a830-73a7246bdc71","html_url":"https://github.com/iiTONELOC/compare-hash","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"d347ef0b055d7c758184cbb4ec7c0fc71e7b02b6"},"previous_names":["iitoneloc/compare-hash"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fcompare-hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fcompare-hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fcompare-hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iiTONELOC%2Fcompare-hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iiTONELOC","download_url":"https://codeload.github.com/iiTONELOC/compare-hash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924493,"owners_count":20694728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-hash-value-validation","integrity","linux","macos","powershell-scripts","shell-scripts","windows"],"created_at":"2024-10-16T07:40:32.078Z","updated_at":"2026-04-09T23:04:04.144Z","avatar_url":"https://github.com/iiTONELOC.png","language":"PowerShell","readme":"# CompareHash\n\n## Screenshot\n\n![Screenshot](./assets/screenshot.png)\n\n## Description\n\nIt is crucial to verify the integrity of download files. CompareHash provides a means for generating the hash of a file and verifying it in a single command with a straight forward syntax regardless of your OS. On Linux and MacOS machines, hashing is handled by the Operating System with a call to the [OpenSSL library](https://www.openssl.org/). On Windows machines, the OS provided [cmdlet](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4) Get-FileHash is used.\n\n## Installation\n\n### Clone the Repo\n\nNavigate to a folder of your choosing in the terminal and clone the repository:\n\n```bash\ngit clone https://github.com/iiTONELOC/compare-hash.git\n```\n\n### Linux/MacOs\n\n#### Configure an Alias\n\nUpdate the bashrc file to add the alias, I have gone with compareHash but you can name it whatever you would like!\n\n```bash\nnano ~/.bashrc\n\n#if Mac or using Zsh\nnano ~./zshrc\n\n# Then add your alias to the bottom of the file using the following syntax\nalias \u003caliasName\u003e=\"\u003c/path/to/compareHash.sh\u003e\"\n\n\n# Save the file and close it, then type the following in the terminal to make the alias available in the current session\nsource ~/.bashrc\n\n# or if using Zsh\nsource ~/.zshrc\n```\n\n`You can now access compareHash.sh using your \u003caliasName\u003e!`\n\n### Windows\n\nA Powershell script has been provided that creates a function called CompareHash and appends it to the user's powershell profile. A profile is created if it does not yet exist.\n\n#### Set Execution Policy\n\nDefault Powershell settings forbid executing local scripts. To install, the execution policy needs to be changed to `Unrestricted`. Start Powershell as an Administrator and run the following command:\n\n```bash\nSet-ExecutionPolicy Unrestricted\n```\n\n#### Execute the Install Script\n\n```bash\n.\\AddCompareHash.ps1\n\n# Reload the profile\n\n. $PROFILE\n```\n\n## Usage\n\n### On Linux/MacOs\n\nIntegrity can be verified using the following command syntax compareHash `/path/to/file \u003cListedHashFromWebSite\u003e \u003calgorithm\u003e`.\n\nHere is an example command verifying against the compareHash.sh file:\n\n```bash\ncompareHash ~/path/to/compareHash.sh bdfff66afcce77d2d40e37a873b8e4b617e5d0f7cfb2aa9fc26b948f52429d93 sha256\nTrue # Expected Output\n```\n\n### On Windows\n\nThe usage is the same as Linux/MacOs, except the name is CompareHash rather than compareHash therefore the syntax is CompareHash `\\path\to\file \u003cListedHashFromWebSite\u003e \u003calgorithm\u003e`\n\nHere is an example of verifying a SHA256 hash for the AddCompareHash PowerShell Script:\n\n```bash\nCompareHash ~\\path\\to\\AddCompareHash.ps1 c52caa2667d3f328ec80a92601b8b97ffd48db5055ba7896ee01ed4ef4ff3d1e sha256\nTrue #Expected Output\n```\n\n### Currently Supported Hash Types\n\n`Hash Type: Expected Argument`\n\n- `MD5: md5`\n- `SHA-1: sha1`\n- `SHA-256: sha256`\n- `SHA-512: sha512`\n\n### Help\n\nHelp can be accessed by using the -h flag or using --help.\n\n## LICENSE\n\nThis project is licensed with an MIT license [which can be viewed here](./LICENSE)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitoneloc%2Fcompare-hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitoneloc%2Fcompare-hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitoneloc%2Fcompare-hash/lists"}