Digests
Type to see the digests here.
Why does a trailing newline change my SHA-256 hash?
SHA-256 hashes the bytes of the input. In UTF-8, adding a line feed after abc adds one byte (0A) and produces a different digest. The empty string also has a defined digest.
Type abc and read the SHA-256 digest. Then press Enter at the end and watch it change as you type. This tool hashes the UTF-8 text in the input box. Use SHA-1 only to compare legacy digests.
- SHA-256 of abc without a trailing newline
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad