To get straight to the point, here's my problem:
mypgdb=# select bytea2text(decrypt(encrypt('Tübingen'::bytea, 'mypassphrase'::bytea,'bf'::text),'mypassphrase'::bytea,'bf'::text)) as foo;
I have compiled and installed pg_crypto and I'am using the following function as workaround for a bytea-to-text-cast:
create or replace function bytea2text(bytea) returns text as '
' language plpgsql;
The cluster was initialized with locale de_DE.UTF-8, pg_controldata confirms:
Database version is PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
I think I'm missing something very obvious here, so please give me a hint: How can I use pgcrypto to encrypt and decrypt text which contains UTF-8 special characters like german umlauts? I think that this simple bytea2text-function probably needs a replacement, but I haven't got the faintest clue about how to actually retrieve the original input after encryption. Any help would be tremendously appreciated :)
Thanks in advance!
pgsql-general by date
|Next:||From: Richard Huxton||Date: 2005-02-28 18:08:59|
|Subject: Re: [GENERAL] Newbie - Pointers on moving.|
|Previous:||From: Steffen Boehme||Date: 2005-02-28 17:26:36|
|Subject: Performance of Views|