X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 91EB7D1B455 for ; Sat, 27 Dec 2003 03:54:41 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 71925-08 for ; Fri, 26 Dec 2003 23:53:55 -0400 (AST) Received: from quality.qadas.com (quality.qadas.com [204.227.16.4]) by svr1.postgresql.org (Postfix) with ESMTP id 16F69D1B44B for ; Fri, 26 Dec 2003 23:53:51 -0400 (AST) Received: from quality.qadas.com (localhost [127.0.0.1]) by quality.qadas.com (8.12.10/8.12.10) with ESMTP id hBR3rqB3012454; Fri, 26 Dec 2003 20:53:52 -0700 (MST) Received: (from mfuhr@localhost) by quality.qadas.com (8.12.10/8.12.10/Submit) id hBR3rbfB012388; Fri, 26 Dec 2003 20:53:37 -0700 (MST) Date: Fri, 26 Dec 2003 20:53:37 -0700 From: Michael Fuhr To: alvaro@audifarma.com.co Cc: pgsql-sql@postgresql.org Subject: Re: MD5 encrypt Message-ID: <20031226205337.A8572@quality.qadas.com> References: <58478.200.31.204.249.1072284473.squirrel@audifarm.audifarma.com.co> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58478.200.31.204.249.1072284473.squirrel@audifarm.audifarma.com.co>; from alvaro@audifarma.com.co on Wed, Dec 24, 2003 at 11:47:53AM -0500 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/194 X-Sequence-Number: 16360 On Wed, Dec 24, 2003 at 11:47:53AM -0500, alvaro@audifarma.com.co wrote: > > Is there any function on postgresql that allows to encrypt data when > making an Insert statment? What kind of encryption are you looking for? MD5 is a one-way hash: you can't decrypt the hash to get back the original plaintext. If that's what you need (e.g., for storing passwords), then you could use the md5() function that's part of the the standard distribution since version 7.4. http://www.postgresql.org/docs/current/static/functions-string.html For older versions of PostgreSQL or for additional encryption functions, see the code in contrib/pgcrypto. -- Michael Fuhr http://www.fuhr.org/~mfuhr/