Is SHA1 doing the right thing?

Hugo’s documentation says that

{{ sha1 "Hello world" }} → 7b502c3a1f48c8609ae212cdfb639dee39673f5e

However, if I run echo -n "Hello World" | shasum the result is
0a4d55a8d778e5022fab701977c5d840bbc486d0
Using an online tool I also get
0a4d55a8d778e5022fab701977c5d840bbc486d0

For MD5 and SHA256, the results online and in the Hugo doc are identical.

So, is Hugo wrong about SHA1? Is it a typo in the documentation? Am I missing something?

“Hello world” != “Hello World”

6 Likes

How embarrassing :frowning:

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.