Re: sha1, sha2 functions into core?
| От | David E. Wheeler |
|---|---|
| Тема | Re: sha1, sha2 functions into core? |
| Дата | |
| Msg-id | 66B4204E-01E7-4CAD-8C0B-0C32EA1B1A9D@kineticode.com обсуждение исходный текст |
| Ответ на | Re: sha1, sha2 functions into core? (Marko Kreen <markokr@gmail.com>) |
| Список | pgsql-hackers |
On Aug 12, 2011, at 5:02 AM, Marko Kreen wrote: > My point was that giving such open-ended list of algorithms > was bad idea, but there is no problem keeping old behaviour. > >> I don't see anything much wrong with sha1(bytea/text) -> bytea. >> There's no law that says it has to work exactly like md5() does. > > The problem is that list of must-have algorithms is getting > quite long: md5, sha1, sha224, sha256, sha384, sha512, > + at least 4 from upcoming sha3. +1 I think some sort of digest() function that takes a parameter naming the algorithm would be the way to go. That's not tosay that the existing named functions could continue to exist -- md5() in core and sha1() in pg_crypto. But it sure seemsto me like we ought to have just one function for digests (or 2, if we also have hexdigest()). Best, David
В списке pgsql-hackers по дате отправления: