Difference between revisions of "Shasum"
Jump to navigation
Jump to search
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[SHA]]256 calculation | + | {{lowercase}} |
− | + | ===[[SHA]]256 calculation=== | |
+ | <code>shasum -a 256 /path/to/file</code> | ||
− | [[SHA]]256 double encoding | + | ===[[SHA]]256 double encoding=== |
echo -n hello | openssl sha256 -binary | openssl sha256 | echo -n hello | openssl sha256 -binary | openssl sha256 | ||
9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50 | 9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50 | ||
+ | |||
+ | ===Example to validate a file=== | ||
+ | echo "c6f04c7c2c0f1706810fa15e5c0cd773310acbfe60dd4cd88459cbefa9a4bb75 [[actions-runner]]-osx-x64-2.283.1.tar.gz" | [[shasum -a 256]] -c | ||
+ | actions-runner-osx-x64-2.283.1.tar.gz: OK | ||
== Related commands == | == Related commands == | ||
*<code>[[openssl]] sha256 /path/to/file</code> | *<code>[[openssl]] sha256 /path/to/file</code> | ||
+ | |||
+ | |||
+ | == See also == | ||
+ | * {{SHA}} | ||
+ | |||
+ | [[Category:Computing]] |
Latest revision as of 11:55, 7 October 2021
Contents
SHA256 calculation[edit]
shasum -a 256 /path/to/file
SHA256 double encoding[edit]
echo -n hello | openssl sha256 -binary | openssl sha256 9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50
Example to validate a file[edit]
echo "c6f04c7c2c0f1706810fa15e5c0cd773310acbfe60dd4cd88459cbefa9a4bb75 actions-runner-osx-x64-2.283.1.tar.gz" | shasum -a 256 -c actions-runner-osx-x64-2.283.1.tar.gz: OK
Related commands[edit]
openssl sha256 /path/to/file
See also[edit]
Advertising: