Storing encrypted data? - Mailing list pgsql-sql

From John Tregea
Subject Storing encrypted data?
Date
Msg-id 44BAE3B0.8060403@debraneys.com
Whole thread Raw
In response to Re: hi i need to connect database from my system to another  ("Penchalaiah P." <penchalaiahp@infics.com>)
Responses Re: Storing encrypted data?
List pgsql-sql
Hi, <br /><br /> Does anyone have experience with storing encrypted data into pgSQL? I have a pgSQL database which
usesUTF8 encoding. I am encrypting plain text in my (GUI) application and sending it to a field (with data type 'text')
inmy database. <br /><br /> I get an error back saying "invalid byte sequence for encoding UTF8; oxd733"<br /><br /> I
amusing blowfish at 128bit to encrypt the string.<br /><br /> The encrypted string comes out looking like this<br /><br
/><fontface="Arial" size="-1">Salted__ë±9r™LZPÃOG¤u–¨ékTz~6Ëpi™|O +LÏ°‹r°ô9•mµ�á%€©õP{:‚Àªd<br />
îX@ûñÙÁl£ðŒ…¢53P9×ð“á6kUÆ¢÷ÍìMNÉA•—ä![ˆj”Ø|¨\X–ÛÜu�ªÅÜ-ÎáBæºñȦbF
>\Žv/ÞÎ.&ó«[=bný�Kr°óË2U×ZI©âVc°sn=¤Õg«^q0Ã8ý<Êh�;”¨"�[Šç+u[£   
–è—=‘±ú3³�ì¯,Za@LU‘T¸œÖgœËPÛ<…H—8ÃbÙÉŽNÙí>ÇL]í¶²–âŒÿ/Ínz¶å<br/>
Õ?Îcµˆ$í¿W-™óà¢ey÷àÞ¬œ¤CðÏjX”ÃGÄ„·º?ë0L‘هƞ‹&ˆ{ªìëá/Ç}k9?ÄX1⋲T½Hõ5Ôgÿ§yÈy…_—ú$lA~©î1úëùññðÑÝŠžgÕþÊ/«¦…8�¯þ   
>ü‚ƒ€–aÈÉ„iG‰}¹²#À</font><br/><br /> I enclose that in single quotes and send it in an insert statement to pgSQL.
<br/><br /> The statement has been working, until I got to a string that generated the above encrypted data, then it
broke.<br/><br /> Alternatively, can anyone suggest an encryption algorithm that will only return characters that are
validUTF8 encoded?<br /><br /> Thanks in advance<br /><br /> John T<br /><br /><br /> 

pgsql-sql by date:

Previous
From: "Nate Teller"
Date:
Subject: Re: How to find entries missing in 2nd table?
Next
From: Michael Fuhr
Date:
Subject: Re: Storing encrypted data?