Add SQL function for SHA1 - Mailing list pgsql-hackers

From Michael Paquier
Subject Add SQL function for SHA1
Date
Msg-id YA7DvLRn2xnTgsMc@paquier.xyz
Whole thread Raw
Responses Re: Add SQL function for SHA1  (Noah Misch <noah@leadboat.com>)
Re: Add SQL function for SHA1  (Sehrope Sarkuni <sehrope@jackdb.com>)
Re: Add SQL function for SHA1  (David Fetter <david@fetter.org>)
List pgsql-hackers
Hi all,

SHA-1 is now an option available for cryptohashes, and like the
existing set of functions of SHA-2, I don't really see a reason why we
should not have a SQL function for SHA1.  Attached is a patch doing
that.

The same code pattern was repeated 4 times on HEAD for the SHA-2
functions for the bytea -> bytea hashing, so I have refactored the
whole thing while integrating the new function, shaving some code from
cryptohashfuncs.c.

Thoughts?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: 'Alvaro Herrera'
Date:
Subject: Re: libpq debug log
Next
From: Greg Nancarrow
Date:
Subject: Re: Parallel INSERT (INTO ... SELECT ...)