25

What is the SHA-256 hash if the input is null, i.e. an empty bitstring? (Not the hash of 0 or "0".)

Paŭlo Ebermann
  • 22,656
  • 7
  • 79
  • 117
Geremia
  • 541
  • 1
  • 4
  • 12

1 Answers1

48

The result of SHA-256 of an empty string is:

e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Accordingly to this and this

Ruggero
  • 7,054
  • 30
  • 40
  • 2
    Verified in Linux with e.g. sha256sum /dev/null and printf | sha256sum – mwfearnley Jul 25 '22 at 10:40
  • Verified in Python with

    import hashlib; m = hashlib.sha256(); assert m.hexdigest() == 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'

    – Simone Aonzo Jan 09 '24 at 16:20