Skip site navigation (1) Skip section navigation (2)

Error Writing/Reading Encrypted Values

From: <cnliou(at)eurosport(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Error Writing/Reading Encrypted Values
Date: 2002-01-10 04:50:40
Message-ID: 200201100450.28df@th00.opsion.fr (view raw or flat)
Thread:
Lists: pgsql-odbc
Hello!

I am trying to store encrypted password in a varchar
(and/or text) column but it is very unstable in my
environment. 
The plain password string is encrypted by a C routine
running in Windoz.  The encrypted password is then
sent from Windoz via psqlODBC to postgresql.

Problem happens when the decryption routine (running
in Windoz) tries to decrypt the encrypted password
retrieved from postgresql - it occasionally succeeds
but hangs most of the time.

"SELECT length(MyEncryptedPasswordColumn) FROM
MyTable" in psql prompt does not much help debugging
as the encrypted password may contains low value(s).

I also found in Windoz that when my encryption
routine aborts, the retrieved encrypted string is
actually corrupted - its string length is 1 byte
longer than it is supposed to be.

Having conducted several testings (by looping
encryption->decryption and feeding various plain
strings to encryption routine within memory without
transmitting data through ODBC to postgresql) on the
encryption/decryption routine, I have the confidence
that the encryption/decryption routine is stable.

My question are:
(1) Is it approriate to store encrypted string which
may contain low values in text or varchar columns?
(2) Is it possible to confuse psqlODBC when writing
to/reading from text column for encrypted string?
(3) Are there any other better ways to debug?

I would much appreciate any help.

CN

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com






Responses

pgsql-odbc by date

Next:From: Liu XiaonanDate: 2002-01-10 04:56:52
Subject: transfer from Access2000 to postgreSQL
Previous:From: cnliouDate: 2002-01-10 04:17:17
Subject: Rep:Re: Incorrect Column Width For Text Columns

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group