Re: pgcryto strangeness...

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

> You can't directly cast varchar to bytea, but you can use decode(in 7.2):
>
> test=# select version();
> version
> -------------------------------------------------------------
> PostgreSQL 7.2b3 on i686-pc-linux-gnu, compiled by GCC 2.96
> (1 row)
>
> test=# create table users_shadow(password varchar(20));
> CREATE
> test=# insert into users_shadow values('secret');
> INSERT 1492547 1
> test=# SELECT DIGEST(decode(password,'escape'), 'md5') FROM users_shadow;
> digest
> ------------------------------------------------------
> ^\276"\224\354\320\340\360\216\253v\220\322\246\356i
> (1 row)
>
>
> HTH,

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

--
Sean Chittenden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vince Vielhaber 2002-01-05 20:43:34 testing 123
Previous Message Joe Conway 2002-01-05 19:56:43 Re: pgcryto strangeness...

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2002-01-05 21:12:01 Re: pgcryto strangeness...
Previous Message Joe Conway 2002-01-05 19:56:43 Re: pgcryto strangeness...