Re: sha1, sha2 functions into core?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Kreen <markokr(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sha1, sha2 functions into core?
Date: 2011-08-11 15:06:33
Message-ID: 4E43EFF9.4090406@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 08/11/2011 10:46 AM, Tom Lane wrote:
> Marko Kreen<markokr(at)gmail(dot)com> writes:
>> On Wed, Aug 10, 2011 at 9:19 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> ... which this approach would create, because digest() isn't restricted
>>> to just those algorithms. I think it'd be better to just invent two
>>> new functions, which also avoids issues for applications that currently
>>> expect the digest functions to be installed in pgcrypto's schema.
>> I would suggest digest() with fixed list of algorithms: md5, sha1, sha2.
>> The uncommon/obsolete algorithms that can be used
>> from digest() if compiled with openssl, are not something we
>> need to worry over. In fact we have never "supported" them,
>> as no testing has been done.
> Hmm ... they may be untested by us, but I feel sure that if we remove
> that functionality from pgcrypto, *somebody* is gonna complain.

Yeah. Maybe we should add a test or two.

> 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.
>
>

I agree. We could provide an md5_b(text/bytea) -> bytea if people are
really concerned about orthogonality.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-08-11 15:17:08 Re: psql: display of object comments
Previous Message Robert Haas 2011-08-11 14:48:32 Re: psql: display of object comments