Skip to content

可以生成与linux中shasum命令输出结果一致的内容吗? #2

Description

@hellozrh

目前可以控制只生成sum值,并指定文件名称。但是linux下验证文件是否有改动时,需要在文件内的格式为:sum值 文件名的形式。

期望可以增加一个参数,指定文件内容仅包含sum值的基础上,再加个参数,包含sum值 文件名,比如:

FileHashGen.exe -f test.zip -c "SHA-256" -ot "only-hash-file" -o test.zip.sha256

生成的文件名为test.zip.sha256,文件内容为

f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2   test.zip

谢谢。

#命令
sha256sum test.txt > text.txt.sha256
cat text.txt.sha256
#输出结果
f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2  test.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions