How to send encrypted data in an xml file

Peter Pentchev roam at ringlet.net
Tue Nov 9 08:57:50 CET 2010


On Mon, Nov 08, 2010 at 04:02:27PM -0500, David Jourard wrote:
> Hi,
> 
> I would like to encrypt a value to a field which is part of data record
> which I'm storing as an xml record.
> 
> Its seems that the ascii armour representation has line feeds. Is it
> possible to represent the data in ascii format without the line feeds.

The ASCII-armoured message format is defined in section 6 of RFC 4880;
it always includes newlines.

Have you thought about including the ASCII-armoured signature in
a CDATA section of your XML file?  Or, alternatively, "simply" encoding
the line break characters as 
 and 
 as specified in section 2.11
of the XML 1.0 specification?

If neither of those is possible, you could always try to encode
the signature in some other way - e.g. take a binary signature and represent
the string of octets as text in some way... of course, that would mean
the recipient would have to know exactly how to decode it.

G'luck,
Peter

-- 
Peter Pentchev	roam at space.bg    roam at ringlet.net    roam at FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If you think this sentence is confusing, then change one pig.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: </pipermail/attachments/20101109/d0d13adb/attachment.pgp>


More information about the Gnupg-users mailing list