Re: does encrypt function support higher than basic ascii? - Mailing list pgsql-general

From Naoko Reeves
Subject Re: does encrypt function support higher than basic ascii?
Date
Msg-id 076DC33A3D38CE4BBC64D35DDD9DE70C098DA55B@mse4be2.mse4.exchange.ms
Whole thread Raw
In response to Re: does encrypt function support higher than basic ascii?  (Richard Huxton <dev@archonet.com>)
Responses Re: does encrypt function support higher than basic ascii?  ("Naoko Reeves" <naoko@lawlogix.com>)
List pgsql-general
I have tried:
select decrypt(encrypt((select convert('aéiou','UTF8', 'LATIN1')),'foo','aes'),'foo','aes')
select decrypt(encrypt((select convert('aéiou','UNICODE', 'LATIN1')),'foo','aes'),'foo','aes')
select decrypt(encrypt((select convert('aéiou','LATIN1', 'LATIN1')),'foo','aes'),'foo','aes')

but none of above seems to be resolving the issue...

-----Original Message-----
From: Richard Huxton [mailto:dev@archonet.com]
Sent: Tuesday, November 17, 2009 1:14 PM
To: Naoko Reeves
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] does encrypt function support higher than basic ascii?

Naoko Reeves wrote:
> Hello,
>
> I have the following statement and accent e doesn't seems to be
> decrypted correctly.
>
> select decrypt(encrypt('aéiou','foo','aes'),'foo','aes')
>
> Could you tell me if there is an option for encoding or this function
> only encrypt basic ascii?

They take bytea rather than text and return bytea too.

Does casting the result give you valid text?

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: does encrypt function support higher than basic ascii?
Next
From: Craig de Stigter
Date:
Subject: Re: Corrupt indices on already-dropped table (could not open relation with OID ...)