Exploring XML Encryption, Part 1

Demonstrating the secure exchange of structured data

Return to article.

Listing 3. Encrypting only the <Payment> element
<?xml version='1.0' ?> 
<PurchaseOrder>
	<Order>
		<Item>book</Item>
		<Id>123-958-74598</Id>
		<Quantity>12</Quantity>
	</Order>
	<EncryptedData Type='http://www.w3.org/2001/04/xmlenc#Element'
     						xmlns='http://www.w3.org/2001/04/xmlenc#'>
		<CipherData>
			<CipherValue>A23B45C564587</CipherValue>
		</CipherData>
	</EncryptedData>
</PurchaseOrder>

Return to article.