sha1, sha2 functions into core?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: sha1, sha2 functions into core?
Date: 2011-08-10 18:06:19
Message-ID: 1312999579.24721.52.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I would like to see whether there is support for adding sha1 and sha2
functions into the core. These are obviously well-known and widely used
functions, but currently the only way to get them is either through
pgcrypto or one of the PLs. We could say that's OK, but then we do
support md5 in core, which then encourages people to use that, when they
really shouldn't use that for new applications. Another weirdness is
that md5() doesn't return bytea but instead the result hex-encoded in a
string, which makes it weird to use in some cases.

One thing that might be reasonable would be to move the digest()
functions

digest(data text, type text) returns bytea
digest(data bytea, type text) returns bytea

from pgcrypto into core, so that pgcrypto is mostly restricted to
encryption, and can be kept at arm's length for those who need to do
that.

(Side note: Would the extension mechanism be able to easily cope with a
move like that?)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-08-10 18:12:49 Re: SHOW command always returns text field
Previous Message Peter Eisentraut 2011-08-10 17:52:28 SHOW command always returns text field