Improve some code around cryptohash functions
Michael Paquier <michael@paquier.xyz>
Improve some code around cryptohash functions This adjusts some code related to recent changes for cryptohash functions: - Add a variable in md5.h to track down the size of a computed result, moved from pgcrypto. Note that pg_md5_hash() assumed a result of this size already. - Call explicit_bzero() on the hashed data when freeing the context for fallback implementations. For MD5, particularly, it would be annoying to leave some non-zeroed data around. - Clean up some code related to recent changes of uuid-ossp. .gitignore still included md5.c and a comment was incorrect. Discussion: https://postgr.es/m/X9HXKTgrvJvYO7Oh@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pgcrypto/internal.c | modified | +0 −4 |
| contrib/uuid-ossp/.gitignore | modified | +0 −1 |
| contrib/uuid-ossp/uuid-ossp.c | modified | +2 −2 |
| src/common/cryptohash.c | modified | +20 −0 |
| src/common/md5_common.c | modified | +1 −1 |
| src/include/common/md5.h | modified | +4 −0 |
Discussion
- Some more hackery around cryptohashes (some fixes + SHA1) 5 messages · 2020-12-10 → 2021-01-23