Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7F93A9FA46C for ; Wed, 7 Mar 2007 17:44:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 16266-04 for ; Wed, 7 Mar 2007 17:44:40 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by postgresql.org (Postfix) with ESMTP id 154639FA42F for ; Wed, 7 Mar 2007 17:44:42 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so362923nfb for ; Wed, 07 Mar 2007 13:44:41 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=sIFV/FL07kVUGcinPIwXpYK3dhPZ8DFEOPxFTquJCTgEj7FJ+V1/sYG7DekjIQayHXHXEG+wENniCAo2AA1EeQ4rsIgbk7XHdZYFoRpO2PkiUbI7zM/CZFNqv+QdN6WhhlmtH5nqh6I1wlPmiaTMRO7gdm9OUaYhkW8NlUBF/FM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=d1EY/QgLuLdZehOeHp+vvUsdVXTZOFuiuPpUHBCJq9Yyx7a5yPdHFtCW7dFo237zxsE8khUP+EElWUPAgRp+MINNv1r2BIqtZs392ZoaR8NTNoZKiEXLnBk4QmjGK3KKg0hF940fRdduvdDIkVN2DqMsBHGj23shhz+4P15kCxA= Received: by 10.82.107.15 with SMTP id f15mr10171739buc.1173303881008; Wed, 07 Mar 2007 13:44:41 -0800 (PST) Received: by 10.49.75.11 with HTTP; Wed, 7 Mar 2007 13:44:39 -0800 (PST) Message-ID: <81961ff50703071344i28d9ea6cr4902fed404b38602@mail.gmail.com> Date: Wed, 7 Mar 2007 16:44:39 -0500 From: "Chad Wagner" To: "Ezequias Rodrigues da Rocha" Subject: Re: SHA-1 vs MD5 Cc: PostgreSQL In-Reply-To: <55c095e90703071204t5aebb921s9d5f1067d3c2f035@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_156829_9189541.1173303879663" References: <55c095e90703071204t5aebb921s9d5f1067d3c2f035@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/79 X-Sequence-Number: 27717 ------=_Part_156829_9189541.1173303879663 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/7/07, Ezequias Rodrigues da Rocha wrote: > > I know that there is a md5 internal function on postgresql, but I noticed > that it isn't the more secure today. I would like to know if there is a > SHA-1 function implemented yet of, if not, if the team has plan to introduce > it on PostgreSQL. You are probably looking for the pgcrypto contribution, look in the contrib directory for it. test=# select encode(digest('blahblah', 'sha256'), 'hex'); encode ------------------------------------------------------------------ 40b1bbb5445fc021a312315379f4633284851e14d1db83fb0730f58872d6033b (1 row) -- Chad http://www.postgresqlforums.com/ ------=_Part_156829_9189541.1173303879663 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/7/07, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com> wrote:
I know that there is a md5 internal function on postgresql, but I noticed that it isn't the more secure today. I would like to know if there is a SHA-1 function implemented yet of, if not, if the team has plan to introduce it on PostgreSQL.

You are probably looking for the pgcrypto contribution, look in the contrib directory for it.

test=# select encode(digest('blahblah', 'sha256'), 'hex');
                              encode                             
------------------------------------------------------------------
 40b1bbb5445fc021a312315379f4633284851e14d1db83fb0730f58872d6033b
(1 row)




--
Chad
http://www.postgresqlforums.com/ ------=_Part_156829_9189541.1173303879663--