sha512sum from terminal is wrong [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite













This question already has an answer here:



  • Why does `md5sum` not give the same hash as the Internet does?

    1 answer



Runing




echo "zyc.txt" | openssl dgst -sha512



(stdin)= 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




or




echo "zyc.txt" | sha512sum 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




Output is wrong, hash should be




DDD2379F9A1ADF4F0AFA0BEFAFDB070FB942D4D4E0331A31D43494149307221E5E699DA2A08F59144B0ED415DEA6F920CF3DAB8CA0B740D874564D83B9B6F815




Here is info on my computer




Linux MobileSpace 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux




sha512sum --version
sha512sum (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.


Is this a bug or am I doing it wrong?







share|improve this question












marked as duplicate by Jeff Schaller, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 27 at 5:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 2




    Echo is messing with you: unix.stackexchange.com/q/65803/117549
    – Jeff Schaller
    Feb 27 at 2:52










  • @JeffSchaller you are so correct, echo is the problem. Wish when looking up how to hash text they would say to use printf instead of echo
    – Jcfunk
    Feb 27 at 2:59














up vote
0
down vote

favorite













This question already has an answer here:



  • Why does `md5sum` not give the same hash as the Internet does?

    1 answer



Runing




echo "zyc.txt" | openssl dgst -sha512



(stdin)= 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




or




echo "zyc.txt" | sha512sum 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




Output is wrong, hash should be




DDD2379F9A1ADF4F0AFA0BEFAFDB070FB942D4D4E0331A31D43494149307221E5E699DA2A08F59144B0ED415DEA6F920CF3DAB8CA0B740D874564D83B9B6F815




Here is info on my computer




Linux MobileSpace 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux




sha512sum --version
sha512sum (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.


Is this a bug or am I doing it wrong?







share|improve this question












marked as duplicate by Jeff Schaller, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 27 at 5:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 2




    Echo is messing with you: unix.stackexchange.com/q/65803/117549
    – Jeff Schaller
    Feb 27 at 2:52










  • @JeffSchaller you are so correct, echo is the problem. Wish when looking up how to hash text they would say to use printf instead of echo
    – Jcfunk
    Feb 27 at 2:59












up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:



  • Why does `md5sum` not give the same hash as the Internet does?

    1 answer



Runing




echo "zyc.txt" | openssl dgst -sha512



(stdin)= 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




or




echo "zyc.txt" | sha512sum 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




Output is wrong, hash should be




DDD2379F9A1ADF4F0AFA0BEFAFDB070FB942D4D4E0331A31D43494149307221E5E699DA2A08F59144B0ED415DEA6F920CF3DAB8CA0B740D874564D83B9B6F815




Here is info on my computer




Linux MobileSpace 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux




sha512sum --version
sha512sum (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.


Is this a bug or am I doing it wrong?







share|improve this question













This question already has an answer here:



  • Why does `md5sum` not give the same hash as the Internet does?

    1 answer



Runing




echo "zyc.txt" | openssl dgst -sha512



(stdin)= 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




or




echo "zyc.txt" | sha512sum 11aa472bf4c97ffb1fae06a3f7175127da084c5dfb840038ee308b37136330e5b6a56cc053c62881f10aec88948d8addb1d4844496cdb08e4067b4fd4601330e




Output is wrong, hash should be




DDD2379F9A1ADF4F0AFA0BEFAFDB070FB942D4D4E0331A31D43494149307221E5E699DA2A08F59144B0ED415DEA6F920CF3DAB8CA0B740D874564D83B9B6F815




Here is info on my computer




Linux MobileSpace 4.14.0-3-amd64 #1 SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux




sha512sum --version
sha512sum (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.


Is this a bug or am I doing it wrong?





This question already has an answer here:



  • Why does `md5sum` not give the same hash as the Internet does?

    1 answer









share|improve this question











share|improve this question




share|improve this question










asked Feb 27 at 2:46









Jcfunk

62




62




marked as duplicate by Jeff Schaller, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 27 at 5:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Jeff Schaller, Stephen Kitt debian
Users with the  debian badge can single-handedly close debian questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Feb 27 at 5:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 2




    Echo is messing with you: unix.stackexchange.com/q/65803/117549
    – Jeff Schaller
    Feb 27 at 2:52










  • @JeffSchaller you are so correct, echo is the problem. Wish when looking up how to hash text they would say to use printf instead of echo
    – Jcfunk
    Feb 27 at 2:59












  • 2




    Echo is messing with you: unix.stackexchange.com/q/65803/117549
    – Jeff Schaller
    Feb 27 at 2:52










  • @JeffSchaller you are so correct, echo is the problem. Wish when looking up how to hash text they would say to use printf instead of echo
    – Jcfunk
    Feb 27 at 2:59







2




2




Echo is messing with you: unix.stackexchange.com/q/65803/117549
– Jeff Schaller
Feb 27 at 2:52




Echo is messing with you: unix.stackexchange.com/q/65803/117549
– Jeff Schaller
Feb 27 at 2:52












@JeffSchaller you are so correct, echo is the problem. Wish when looking up how to hash text they would say to use printf instead of echo
– Jcfunk
Feb 27 at 2:59




@JeffSchaller you are so correct, echo is the problem. Wish when looking up how to hash text they would say to use printf instead of echo
– Jcfunk
Feb 27 at 2:59










1 Answer
1






active

oldest

votes

















up vote
2
down vote













Echo appends a newline, which you may suppress with -n:



echo -n "zyc.txt" | sha512sum 
ddd2379f9a1adf4f0afa0befafdb070fb942d4d4e0331a31d43494149307221e5e699da2a08f59144b0ed415dea6f920cf3dab8ca0b740d874564d83b9b6f815 -


Most of the time, you enjoy the newline, so your prompt is on the start of the next line, not in the middle of the last output line.



You have to keep that in mind when doing wc, too:



echo -n "zyc.txt" | wc
0 1 7
echo "zyc.txt" | wc
1 1 8





share|improve this answer



























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    Echo appends a newline, which you may suppress with -n:



    echo -n "zyc.txt" | sha512sum 
    ddd2379f9a1adf4f0afa0befafdb070fb942d4d4e0331a31d43494149307221e5e699da2a08f59144b0ed415dea6f920cf3dab8ca0b740d874564d83b9b6f815 -


    Most of the time, you enjoy the newline, so your prompt is on the start of the next line, not in the middle of the last output line.



    You have to keep that in mind when doing wc, too:



    echo -n "zyc.txt" | wc
    0 1 7
    echo "zyc.txt" | wc
    1 1 8





    share|improve this answer
























      up vote
      2
      down vote













      Echo appends a newline, which you may suppress with -n:



      echo -n "zyc.txt" | sha512sum 
      ddd2379f9a1adf4f0afa0befafdb070fb942d4d4e0331a31d43494149307221e5e699da2a08f59144b0ed415dea6f920cf3dab8ca0b740d874564d83b9b6f815 -


      Most of the time, you enjoy the newline, so your prompt is on the start of the next line, not in the middle of the last output line.



      You have to keep that in mind when doing wc, too:



      echo -n "zyc.txt" | wc
      0 1 7
      echo "zyc.txt" | wc
      1 1 8





      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        Echo appends a newline, which you may suppress with -n:



        echo -n "zyc.txt" | sha512sum 
        ddd2379f9a1adf4f0afa0befafdb070fb942d4d4e0331a31d43494149307221e5e699da2a08f59144b0ed415dea6f920cf3dab8ca0b740d874564d83b9b6f815 -


        Most of the time, you enjoy the newline, so your prompt is on the start of the next line, not in the middle of the last output line.



        You have to keep that in mind when doing wc, too:



        echo -n "zyc.txt" | wc
        0 1 7
        echo "zyc.txt" | wc
        1 1 8





        share|improve this answer












        Echo appends a newline, which you may suppress with -n:



        echo -n "zyc.txt" | sha512sum 
        ddd2379f9a1adf4f0afa0befafdb070fb942d4d4e0331a31d43494149307221e5e699da2a08f59144b0ed415dea6f920cf3dab8ca0b740d874564d83b9b6f815 -


        Most of the time, you enjoy the newline, so your prompt is on the start of the next line, not in the middle of the last output line.



        You have to keep that in mind when doing wc, too:



        echo -n "zyc.txt" | wc
        0 1 7
        echo "zyc.txt" | wc
        1 1 8






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 27 at 3:41









        user unknown

        6,95412148




        6,95412148












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay