Home > Archive > PostgreSQL Discussion > April 2006 > Re: pgcrypto-crypt









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: pgcrypto-crypt
chris smith

2006-04-06, 7:32 am

On 4/6/06, AKHILESH GUPTA <akhilesh.davim@gmail.com> 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/

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Chris

2006-04-06, 8:25 pm

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_passw
ord');

> 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* <dmagick@gmail.com < mailto:dmagick@gmail
.com>>
> wrote:
>
> On 4/6/06, AKHILESH GUPTA <akhilesh.davim@gmail.com
> <mailto:akhilesh.davim@gmail.com>> wrote:
> (i.e-password
> function
> 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/

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com