找一个查看文件hash值的小工具貌似很难?

想找一个绿色的、免安装的、最好是单文件的能计算文件HASH值的小工具,求推荐:pray:

在主站分别以“MD5”、“SHA1”和“HASH”为关键词搜索,结果貌似几乎都是很多年前的信息,且几乎都失效了……

1 个赞

gitbash, cygwin shell 等终端自带的命令:

md5sum test.7z
sha1sum test.7z
sha256sum test.7z
sha512sum test.7z

md5sum test.7z > test.7z.txt

7z 的终端命令:

7z h -scrcSHA256 test.7z
7z h -scrcSHA1 test.7z

7z h -scrcSHA1 test.7z > test.7z.sha1

可选参数:

  h : Calculate hash values for files
  -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands

文件类型不限,上面的 test.7z 也可以是 test.txt。

所以,这个需求对多数经常使用它的人就不存在。

2 个赞

几句代码就可以写一个,
aardio 范例里就有这个源码,可以一键生成单文件,绿色,免安装的 EXE
screenshots

推荐一波Windows下的 HashTab,嵌入到属性窗口,自己用着感觉很方便,支持的算法也很全,基本上能见到的标准hash都有(虽然停更6年了,而且官网也404了

虽然体积挺小,但并不是绿色免安装哈

下载地址:https://hashtab.en.softonic.com

4 个赞
  1. 7z自带有右键菜单。

  2. 或者cmd运行

certutil -hashfile yourFile sha512
certutil -hashfile yourFile sha384
certutil -hashfile yourFile sha256
certutil -hashfile yourFile sha1
certutil -hashfile yourFile md5
certutil -hashfile yourFile md4
  1. 魔方的文件大师好像可以单文件运行?
3 个赞

比较经典的 Soft-Hash (keir.net)

还有集成更好的 idrassi/HashCheck: HashCheck Shell Extension for Windows with added SHA2, SHA3, and multithreading; originally from code.kliu.org (github.com)

https://github.com/jNizM/HashCalc

ahk 开发,开源,release 里有构建好的单文件 exe,不放心的话也可以自己生成一下。

Nirsoft 家的都是.

HashMyFiles 是一个绿色单程序,不需要任何安装过程或额外的 DLL 文件。

支持中文,支持命令行。

可让您计算系统中一个或多个文件的 MD5 和 SHA1 哈希值。您可以轻松地将 MD5/SHA1 哈希列表复制到剪贴板,或将它们保存到 text/html/xml 文件中。
HashMyFiles 也可以从 Windows 资源管理器的上下文菜单中启动,并显示所选文件或文件夹的 MD5/SHA1 哈希值。

1 个赞

Windows自帶啊:

Get-FileHash 文件 MD5
Get-FileHash 文件 SHA1
Get-FileHash 文件 SHA256

需要在PowerShell下執行。

4 个赞

windows下 在注册表加 右键打开 :

Windows Registry Editor Version 5.00
;文件Hash校验
[HKEY_CLASSES_ROOT*\shell\文件哈希校验]
“SubCommands”=“MACTripleDES;MD5;RIPEMD160;SHA1;SHA256;SHA384;SHA512”
“MUIVerb”=“文件哈希校验”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MACTripleDES]
@=“MACTripleDES”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MACTripleDES\command]
@=“PowerShell Get-FileHash -Algorithm MACTripleDES \"%1\" | format-list;“按任意键退出…”;[Console]::Readkey() | Out-Null;exit”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MD5]
@=“MD5”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\MD5\command]
@=“PowerShell Get-FileHash -Algorithm MD5 \"%1\" | format-list;“按任意键退出…”;[Console]::Readkey() | Out-Null;exit”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RIPEMD160]
@=“RIPEMD160”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RIPEMD160\command]
@=“PowerShell Get-FileHash -Algorithm RIPEMD160 \"%1\" | format-list;“按任意键退出…”;[Console]::Readkey() | Out-Null;exit”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA1]
@=“SHA1”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA1\command]
@=“PowerShell Get-FileHash -Algorithm SHA1 \"%1\" | format-list;“按任意键退出…”;[Console]::Readkey() | Out-Null;exit”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA256]
@=“SHA256”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA256\command]
@=“PowerShell Get-FileHash -Algorithm SHA256 \"%1\" | format-list;“按任意键退出…”;[Console]::Readkey() | Out-Null;exit”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA384]
@=“SHA384”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA384\command]
@=“PowerShell Get-FileHash -Algorithm SHA384 \"%1\" | format-list;“按任意键退出…”;[Console]::Readkey() | Out-Null;exit”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA512]
@=“SHA512”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SHA512\command]
@=“PowerShell Get-FileHash -Algorithm SHA512 \"%1\" | format-list;“按任意键退出…”;[Console]::Readkey() | Out-Null;exit”

以上保存为.reg,双击导入 就行了.右键就有选项

这个很好用。

报错:“Get-FileHash : 找不到接受实际参数“SHA256”的位置形式参数。”

搞懂了!
应该是 Get-FileHash “文件路径”
上边这行是默认的sha256,
如果需要md5或者sha1的话需要带参数 “-Algorithm”,然后后边再跟md5或者sha1。

谢谢以上所有各位热心大佬的帮助:pray::man_bowing:

一直用的这个

以前经常用 一款软件叫"Hash校验工具"

PowerShell 7是不用加-Algorithm的,看來下次我來考慮一下老版本語言。

这个小工具很多啊。
md5

居然支持 BLAKE3
非常感谢!