Encryption
Charles Curley
charlescurley at charlescurley.com
Wed Mar 23 12:50:03 MST 2005
On Wed, Mar 23, 2005 at 12:45:04PM -0700, Charles Curley wrote:
> On Wed, Mar 23, 2005 at 12:36:20PM -0700, Michael L Torrie wrote:
> > On Wed, 2005-03-23 at 12:18 -0700, Eric Jensen wrote:
> > > Wasn't sure if running something like "addslashes" on the string would
> > > currupt the data.
> >
> > I don't think you want to run addslashes. Use the mysl-specific escape
> > function.
>
> mysql_escape_string -- Escapes a string for use in a mysql_query
>
> http://www.php.net/manual/en/function.mysql-escape-string.php
On second thought, I don't know how well this handles binary data. The
advice to ascii armor the encrypted data makes escaping
irrelevant. Declare the column as text, which should take care of the
line endings in the ascii armored output.
--
Charles Curley /"\ ASCII Ribbon Campaign
Looking for fine software \ / Respect for open standards
and/or writing? X No HTML/RTF in email
http://www.charlescurley.com / \ No M$ Word docs in email
Key fingerprint = CE5C 6645 A45A 64E4 94C0 809C FFF6 4C48 4ECD DFDB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://plug.org/pipermail/plug/attachments/20050323/22002e58/attachment.bin
More information about the PLUG
mailing list