Why a different SHA-1 for the same file under windows or linux?

Posted by Fabio Vitale on Stack Overflow See other posts from Stack Overflow or by Fabio Vitale
Published on 2010-05-30T05:16:58Z Indexed on 2010/05/30 5:22 UTC
Read the original article Hit count: 320

Filed under:
|
|
|
|

Why on the same machine computing the SHA-1 hash of the same file produces two completely different SHA-1 hashes in windows and inside a msysgit Git bash?

Doesn't the SHA-1 algorithm was intended to produce the same hash for the same file in all OSes?

On windows (with HashCheck): File hello.txt 22596363b3de40b06f981fb85d82312e8c0ed511

Inside a msysgit's Git bash windows (same machine, same file):

$ git hash-object hello.txt 3b18e512dba79e4c8300dd08aeb37f8e728b8dad

© Stack Overflow or respective owner

Related posts about Windows

Related posts about linux