X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 9E36E11F66C6 for ; Thu, 6 Apr 2006 19:24:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53077-05 for ; Thu, 6 Apr 2006 19:24:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.192]) by postgresql.org (Postfix) with ESMTP id 8F20E11F66CC for ; Thu, 6 Apr 2006 19:24:35 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id q3so233901nzb for ; Thu, 06 Apr 2006 15:24:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=tWUpm2F8egCcS1th799TR38ZBLEjIO6ueyYX1W1L6qh2I6exYksPXu9srIiJha3vfAF1qaRgHkQqoOfltmJP43uPPhaycdvcc0gbxOy04SRY0d5lj2lxI+yJoScH+a3VNxLyfh9EKKxc+id+W81l+Lb/6oxpQ+fxIKcE74fJ1nE= Received: by 10.64.24.20 with SMTP id 20mr568345qbx; Thu, 06 Apr 2006 15:24:35 -0700 (PDT) Received: from ?10.1.1.22? ( [203.217.18.65]) by mx.gmail.com with ESMTP id a29sm26009qbd.2006.04.06.15.24.33; Thu, 06 Apr 2006 15:24:35 -0700 (PDT) Message-ID: <44359520.2060407@gmail.com> Date: Fri, 07 Apr 2006 08:24:32 +1000 From: Chris User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: AKHILESH GUPTA CC: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: pgcrypto-crypt References: <3c1395330604060153p4d773e0fu574a190de1fa4d9a@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200604/279 X-Sequence-Number: 93721 AKHILESH GUPTA wrote: > how do we compare the existing data in the table with the entered one? same way as anything else, for example: select * from users where passwd=md5('my_password'); > is there any other function which we can use here for both cases > encryption as well as for decryption at the script as well as database > level.... why do you need it encrypted? Please do reply-all - you will get a quicker response (from me and the list(s) might have suggestions I don't). > On 4/6/06, *chris smith* > > wrote: > > On 4/6/06, AKHILESH GUPTA > wrote: > > dear all, > > i want to encrypt and decrypt one of the fields in my table > (i.e-password > > field) > > i have searched and with the help of pgcrypto package, using > function > > "crypt", i am able to encrypt my data, > > but there is nothing which i found to decrypt that same data, > > plz anybody give me the function to decrypt that encrypted > value..... > > The crypt function can't be decrypted (whether it's in postgresql or > anywhere else). > > Crypt is meant to be used for passwords and such that you don't need > to reverse (you only compare against). > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > > > > -- > Thanks & Regards, > Akhilesh > DAV Institute of Management > Faridabad(Haryana) > GSM:-(+919891606064) > (+911744293789) > > "FAILURES CAN BE FORGIVEN BUT AIMING LOW IS A CRIME" -- Postgresql & php tutorials http://www.designmagick.com/