Refactor SQL functions of SHA-2 in cryptohashfuncs.c
Michael Paquier <michael@paquier.xyz>
Refactor SQL functions of SHA-2 in cryptohashfuncs.c The same code pattern was repeated four times when compiling a SHA-2 hash. This refactoring has the advantage to issue a compilation warning if a new value is added to pg_cryptohash_type, so as anybody doing an addition in this area would need to consider if support for a new SQL function is needed or not. Author: Sehrope Sarkuni, Michael Paquier Discussion: https://postgr.es/m/YA7DvLRn2xnTgsMc@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/cryptohashfuncs.c | modified | +54 −84 |
Discussion
- Add SQL function for SHA1 12 messages · 2021-01-25 → 2021-01-28