Write/Read Encrypted Text
От | |
---|---|
Тема | Write/Read Encrypted Text |
Дата | |
Msg-id | 200201090355.3187@th00.opsion.fr обсуждение исходный текст |
Список | pgsql-general |
Hello! I am trying to store encrypted password in a 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 succeeds occasionally 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). However, I do find in Windoz that the retrieved encrypted text is sometimes corrupted because the C strlen(MyEncryptedPassword) function sometimes returns longer integer than expected. It does not surprise me for strlen() to return shorter values than expected (due to low values), but it should not return longer values than expected. Having conducted several testings on the C encryption routine, I have the confidence that the encryption routine is stable. My question are: (1) Is it approriate to store encrypted text which may contain low values in text 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
В списке pgsql-general по дате отправления: