How to check a hash sum file on FreeBSD?
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
Situation
I'm on FreeBSD 11.2 without GUI. I'm brand new to BSD systems.
Suppose we have a SHA512SUM
file generated on FreeBSD with:
sha512 encrypt-file-aes256 decrypt-file-aes256 > SHA512SUM
It looks different from the Linux format, which from Linux can be generated using --tag
switch:
SHA512 (encrypt-file-aes256) = 9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017
SHA512 (decrypt-file-aes256) = 893693eec618542b0b95051952f9258824fe7004c360f8e6056a51638592510a704e27b707b9176febca655b7df581c9a6e2220b6511e8426c1501f6b2dd48a9
Question
How do I check this file? There is no --check
option in the man page.
Progress
So far, I am only able to manually test a single file with hard-coding the hash sum:
sha512 -c "9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017" encrypt-file-aes256 && echo $?
Scripting-wise, I don't yet see a way of checking the whole SHA512SUM
file automatically.
Note, that it may contain many more files than the two as in my case.
freebsd hashsum
add a comment |Â
up vote
5
down vote
favorite
Situation
I'm on FreeBSD 11.2 without GUI. I'm brand new to BSD systems.
Suppose we have a SHA512SUM
file generated on FreeBSD with:
sha512 encrypt-file-aes256 decrypt-file-aes256 > SHA512SUM
It looks different from the Linux format, which from Linux can be generated using --tag
switch:
SHA512 (encrypt-file-aes256) = 9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017
SHA512 (decrypt-file-aes256) = 893693eec618542b0b95051952f9258824fe7004c360f8e6056a51638592510a704e27b707b9176febca655b7df581c9a6e2220b6511e8426c1501f6b2dd48a9
Question
How do I check this file? There is no --check
option in the man page.
Progress
So far, I am only able to manually test a single file with hard-coding the hash sum:
sha512 -c "9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017" encrypt-file-aes256 && echo $?
Scripting-wise, I don't yet see a way of checking the whole SHA512SUM
file automatically.
Note, that it may contain many more files than the two as in my case.
freebsd hashsum
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
Situation
I'm on FreeBSD 11.2 without GUI. I'm brand new to BSD systems.
Suppose we have a SHA512SUM
file generated on FreeBSD with:
sha512 encrypt-file-aes256 decrypt-file-aes256 > SHA512SUM
It looks different from the Linux format, which from Linux can be generated using --tag
switch:
SHA512 (encrypt-file-aes256) = 9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017
SHA512 (decrypt-file-aes256) = 893693eec618542b0b95051952f9258824fe7004c360f8e6056a51638592510a704e27b707b9176febca655b7df581c9a6e2220b6511e8426c1501f6b2dd48a9
Question
How do I check this file? There is no --check
option in the man page.
Progress
So far, I am only able to manually test a single file with hard-coding the hash sum:
sha512 -c "9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017" encrypt-file-aes256 && echo $?
Scripting-wise, I don't yet see a way of checking the whole SHA512SUM
file automatically.
Note, that it may contain many more files than the two as in my case.
freebsd hashsum
Situation
I'm on FreeBSD 11.2 without GUI. I'm brand new to BSD systems.
Suppose we have a SHA512SUM
file generated on FreeBSD with:
sha512 encrypt-file-aes256 decrypt-file-aes256 > SHA512SUM
It looks different from the Linux format, which from Linux can be generated using --tag
switch:
SHA512 (encrypt-file-aes256) = 9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017
SHA512 (decrypt-file-aes256) = 893693eec618542b0b95051952f9258824fe7004c360f8e6056a51638592510a704e27b707b9176febca655b7df581c9a6e2220b6511e8426c1501f6b2dd48a9
Question
How do I check this file? There is no --check
option in the man page.
Progress
So far, I am only able to manually test a single file with hard-coding the hash sum:
sha512 -c "9170caaa45303d2e5f04c21732500980f3b06fc361018f953127506b56d3f2f46c95efdc291e160dd80e39b5304f327d83fe72c625ab5f31660db9c99dbfd017" encrypt-file-aes256 && echo $?
Scripting-wise, I don't yet see a way of checking the whole SHA512SUM
file automatically.
Note, that it may contain many more files than the two as in my case.
freebsd hashsum
freebsd hashsum
edited 35 mins ago
scai
6,32221734
6,32221734
asked 6 hours ago


Vlastimil
6,9671152125
6,9671152125
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
6
down vote
accepted
You can use the shasum
(man page) tool, which has a -c
option to check against a checksum file and is a front-end to the several checksum algorithms including SHA-512.
In your case, this command should be enough to check both files:
$ shasum -a 512 -c SHA512SUM
If you use a truncated checksum (such as SHA-512/256) you might need to select the algorithm explicitly through the -a
option. But it should not be necessary.
Note, that you have to use the standard (Linux) format of SHA512SUM
file in order for the check to succeed, otherwise you'd get a confusing error:
no properly formatted sha1 checksum lines found
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
You can use the shasum
(man page) tool, which has a -c
option to check against a checksum file and is a front-end to the several checksum algorithms including SHA-512.
In your case, this command should be enough to check both files:
$ shasum -a 512 -c SHA512SUM
If you use a truncated checksum (such as SHA-512/256) you might need to select the algorithm explicitly through the -a
option. But it should not be necessary.
Note, that you have to use the standard (Linux) format of SHA512SUM
file in order for the check to succeed, otherwise you'd get a confusing error:
no properly formatted sha1 checksum lines found
add a comment |Â
up vote
6
down vote
accepted
You can use the shasum
(man page) tool, which has a -c
option to check against a checksum file and is a front-end to the several checksum algorithms including SHA-512.
In your case, this command should be enough to check both files:
$ shasum -a 512 -c SHA512SUM
If you use a truncated checksum (such as SHA-512/256) you might need to select the algorithm explicitly through the -a
option. But it should not be necessary.
Note, that you have to use the standard (Linux) format of SHA512SUM
file in order for the check to succeed, otherwise you'd get a confusing error:
no properly formatted sha1 checksum lines found
add a comment |Â
up vote
6
down vote
accepted
up vote
6
down vote
accepted
You can use the shasum
(man page) tool, which has a -c
option to check against a checksum file and is a front-end to the several checksum algorithms including SHA-512.
In your case, this command should be enough to check both files:
$ shasum -a 512 -c SHA512SUM
If you use a truncated checksum (such as SHA-512/256) you might need to select the algorithm explicitly through the -a
option. But it should not be necessary.
Note, that you have to use the standard (Linux) format of SHA512SUM
file in order for the check to succeed, otherwise you'd get a confusing error:
no properly formatted sha1 checksum lines found
You can use the shasum
(man page) tool, which has a -c
option to check against a checksum file and is a front-end to the several checksum algorithms including SHA-512.
In your case, this command should be enough to check both files:
$ shasum -a 512 -c SHA512SUM
If you use a truncated checksum (such as SHA-512/256) you might need to select the algorithm explicitly through the -a
option. But it should not be necessary.
Note, that you have to use the standard (Linux) format of SHA512SUM
file in order for the check to succeed, otherwise you'd get a confusing error:
no properly formatted sha1 checksum lines found
edited 5 hours ago
answered 6 hours ago


Filipe Brandenburger
4,447623
4,447623
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476479%2fhow-to-check-a-hash-sum-file-on-freebsd%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password