Re: pgcryto strangeness...

From: Joe Conway <joseph(dot)conway(at)home(dot)com>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgcryto strangeness...
Date: 2002-01-05 21:12:01
Message-ID: 3C376C21.8080407@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Sean Chittenden wrote:

> Yeah, it does... but it also tells me I'm SOL for 7.1.3 even though
> pgcrypto comes with a DECODE() function (only supports 'hex' and
> 'base64'). Any other ideas? <:~) -sc
>

Not sure if you are in a position to do this, but why not make your
password field bytea instead of varchar? This won't work if you need to
support multibyte passwords, but I think it should be fine otherwise.

test=# create table users_shadow_2(password bytea);
CREATE
test=# insert into users_shadow_2 values('secret');
INSERT 1492553 1
test=# SELECT DIGEST(password, 'md5') FROM users_shadow_2;
digest
------------------------------------------------------
^\276"\224\354\320\340\360\216\253v\220\322\246\356i

Joe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-05 21:39:31 Re: pgcryto strangeness...
Previous Message Vince Vielhaber 2002-01-05 20:43:34 testing 123

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-01-05 21:39:31 Re: pgcryto strangeness...
Previous Message Sean Chittenden 2002-01-05 20:09:39 Re: pgcryto strangeness...