如何使用 Java 将 Fedora iso 下载文件与其在 Windows 中的 sha-256 校验和文本文件进行比较?
How to compare an Fedora iso download file with its sha-256 checksum text file in Windows using Java?
我想验证我下载的 Fedora ISO 映像的 sha256 校验和及其校验和文本文件。我在一个目录中有 iso 和校验和文本文件。我按照 Windows 的 Fedora 验证下载图像 (https://docs.fedoraproject.org/en-US/Fedora/22/html/Installation_Guide/sect-verifying-images.html) 说明进行操作,并在使用 Windows8.1 powershell 时遇到错误 "The file is too long, this operation is currently limited to supporting files less than 2 gigabytes in size"。 ISO 映像文件大小为 2.165GB。现在是否有可用的 Java api 或工具,这样我就不必重新发明轮子了?我没有 Linux/
如果您使用的是 Powershell 4.0 或更高版本(因为您说您使用的是 Windows 8.1),您可以使用 Get-FileHash cmdlet。示例:
Get-FileHash -Algorithm SHA256 .\en_visual_studio_enterprise_2015_x86_x64_dvd_6850497.iso
The Fedora documentation has you covered(我想您需要参考)。
请记住,文档通常在非核心项目中稍有滞后,因此如果您发现最新版本缺少您已经习惯查找的文档,请回顾一两个版本(就像我在这种情况下所做的那样)。
有Windows GUI 和Windows CLI 两种验证方法,参考了一些实用程序来计算sha256sum
我不能完全判断问题是否使用额外的软件来完全自动化两个哈希值的实际比较。看起来不像,所以我认为它可以从这个班轮中受益:
get-filehash ./relativeLocationOfFileToCompare | select -expandproperty hash | compare-object theHashYouWantToCompare
即
get-filehash -Algorithm SHA256 .\en_visual_studio_enterprise_2015_x86_x64_dvd_6850497.iso | select -expandproperty hash | compare-object 64f6ca69ccb3efc79e350977d33109c380a744c26158c4e3956141535242e2ca
如果没有输出,则校验和匹配。
我想验证我下载的 Fedora ISO 映像的 sha256 校验和及其校验和文本文件。我在一个目录中有 iso 和校验和文本文件。我按照 Windows 的 Fedora 验证下载图像 (https://docs.fedoraproject.org/en-US/Fedora/22/html/Installation_Guide/sect-verifying-images.html) 说明进行操作,并在使用 Windows8.1 powershell 时遇到错误 "The file is too long, this operation is currently limited to supporting files less than 2 gigabytes in size"。 ISO 映像文件大小为 2.165GB。现在是否有可用的 Java api 或工具,这样我就不必重新发明轮子了?我没有 Linux/
如果您使用的是 Powershell 4.0 或更高版本(因为您说您使用的是 Windows 8.1),您可以使用 Get-FileHash cmdlet。示例:
Get-FileHash -Algorithm SHA256 .\en_visual_studio_enterprise_2015_x86_x64_dvd_6850497.iso
The Fedora documentation has you covered(我想您需要参考)。
请记住,文档通常在非核心项目中稍有滞后,因此如果您发现最新版本缺少您已经习惯查找的文档,请回顾一两个版本(就像我在这种情况下所做的那样)。
有Windows GUI 和Windows CLI 两种验证方法,参考了一些实用程序来计算sha256sum
我不能完全判断问题是否使用额外的软件来完全自动化两个哈希值的实际比较。看起来不像,所以我认为它可以从这个班轮中受益:
get-filehash ./relativeLocationOfFileToCompare | select -expandproperty hash | compare-object theHashYouWantToCompare
即
get-filehash -Algorithm SHA256 .\en_visual_studio_enterprise_2015_x86_x64_dvd_6850497.iso | select -expandproperty hash | compare-object 64f6ca69ccb3efc79e350977d33109c380a744c26158c4e3956141535242e2ca
如果没有输出,则校验和匹配。