Re: [general] Encrypting/Decryption

Поиск
Список
Период
Сортировка
От Naveed Shaikh
Тема Re: [general] Encrypting/Decryption
Дата
Msg-id CAC50kKjDS6xHJo9EMYbS4kV7Bd=CmziOCWUO+WOp3AF=sVy_TA@mail.gmail.com
обсуждение исходный текст
Ответ на [general] Encrypting/Decryption  (VENKTESH GUTTEDAR <venkteshguttedar@gmail.com>)
Список pgsql-general
Hi Venktesh,

Following is small test case:
======================

leon=# create table demo(pw bytea);
CREATE TABLE
leon=# insert into demo(pw) values ( encrypt( 'data', 'key', 'aes') );
INSERT 0 1
leon=# select decrypt(pw, 'key', 'aes') FROM demo;
  decrypt   
------------
 \x64617461
(1 row)

leon=# select convert_from(decrypt(pw, 'key', 'aes'), 'utf-8') FROM demo;
 convert_from 
--------------
 data
(1 row)

BTW, please think carefully about whether PgCrypto is really the right choice. Keys in your queries can be revealed in pg_stat_activity and the system logs via log_statement or via crypto statements that fail with an error.

You can follow the below link for more information regarding the encryption options:


Hope this helps.


Thanks & Regards,
Naveed Shaikh
Senior Systems Engineer



To reach Support Call:
US: +1-732-331-1320 - UK: +44 - 2033719820
Brazil: +55-2139581371 - India: +91-20-32676535



Are you updated: Latest version of Postgres Plus Advanced Server are 8.4.19.42, 9.0.17.35, 9.1.13.21, 9.2.8.19 and 9.3.4.10  


EnterpriseDB Blog: http://blogs.enterprisedb.com

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.

On Mon, Nov 17, 2014 at 4:53 PM, VENKTESH GUTTEDAR <venkteshguttedar@gmail.com> wrote:
Hello,

    As i am new to postgresql and django. please help me to acheive the following.

    I have created a database with some tables and i want to encrypt the data in database tables, so please someone guide me how to do it.?

    i want to encrypt the data and also decrypt through django, so tell me which is right way either to use pgcrypto or pycryto,
    i am not understanding neither of them. please help.

--
Regards :
Venktesh Guttedar.


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

Предыдущее
От: VENKTESH GUTTEDAR
Дата:
Сообщение: [general] Encrypting/Decryption
Следующее
От: Bill Moran
Дата:
Сообщение: Re: [general] Encrypting/Decryption