Fwd: How to encrypt a column

Поиск
Список
Период
Сортировка
От Jeff Lu
Тема Fwd: How to encrypt a column
Дата
Msg-id 20050811203922.84270.qmail@web50602.mail.yahoo.com
обсуждение исходный текст
Ответы Re: Fwd: How to encrypt a column  ("Owen Jacobson" <ojacobson@osl.com>)
Список pgsql-sql
Hi,
 
I'm interested in encrypting an column in table.  Are there any example using "C" to create the encrypted column, inserting and retreiving data  to/from it?
 
the table is:
CREATE TABLE mytable ( 
     id SERIAL PRIMARY KEY, 
     crypted_content BYTEA );
I'm getting (null) in the field with the following sql statement:
 
strcpy(data, "data to be encrypted");
sprintf(query_buff, "insert into mytable values('%s', '%s')", key, encrypt(data, 'foo', 'bar'));
PQexec(conn, query_string);
 
Another question is can the encrypted column be of type "text" ?
 
Thank you


Start your day with Yahoo! - make it your home page

В списке pgsql-sql по дате отправления:

Предыдущее
От: Jeff Boes
Дата:
Сообщение: Re: How to alias table columns in result?
Следующее
От: "Owen Jacobson"
Дата:
Сообщение: Re: Fwd: How to encrypt a column