SHA-256 vs SHA-512
Choose a widely supported digest and understand what a matching hash proves.
Choose a widely supported digest and understand what a matching hash proves.
A cryptographic hash turns bytes into a fixed-length digest. The same input produces the same digest; a one-byte change should produce a different result.
SHA-256 produces 64 hexadecimal characters. SHA-512 produces 128. Leading zeroes are part of the result.
Use the algorithm published by the software vendor or protocol. Compatibility normally matters more than choosing the longer output.
Password storage requires a deliberately slow, salted password-hashing function, not plain SHA-256 or SHA-512.