How to check a hash sum file on FreeBSD?

The name of the pictureThe name of the pictureThe name of the pictureClash 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.










share|improve this question



























    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.










    share|improve this question

























      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.










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 35 mins ago









      scai

      6,32221734




      6,32221734










      asked 6 hours ago









      Vlastimil

      6,9671152125




      6,9671152125




















          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





          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            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






























            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





            share|improve this answer


























              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





              share|improve this answer
























                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





                share|improve this answer














                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






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 5 hours ago

























                answered 6 hours ago









                Filipe Brandenburger

                4,447623




                4,447623



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    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













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    Confectionery