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