|
|
|
|
|
by TheDong
2008 days ago
|
|
This isn't good security advice. Taking trunc(32, hex(sha512)) will still give you a result that is stronger cryptographically than taking the 32 characters hex(md5sum) would give you. For more security, you of course can encode the sha512 hash in a format other than hex in order to let those 64 bytes be fewer characters. The hex encoding is only one of many encodings. But the main point is that the solution to needing to store a shorter value is not to use a weaker hashing algorithm, but to truncate the result. This is the reason that sha-512/256 exists as a truncated sha-512 even though sha-256 already existed. |
|
[1] https://crypto.stackexchange.com/questions/12822/are-the-sha...