XmlEncryptor - An XML Encryption Demonstrator

Author: Ed Simon

XmlEncryptor demonstrates how to encrypt XML nodes within the DOM. In this version, the types of nodes that are encrypted are

To run XmlEncryptor,

  1. Copy the XmlEncryptor.java and XmlEncryptionTest.xml files in a folder.
  2. Install JCE 1.2.1 (or higher) from "http://java.sun.com" and the Xerces parser from "http://xml.apache.org".
  3. Compile XmlEncryptor.java using the classpath illustrated here:
    javac -classpath d:\xerces-1_2_0\xerces.jar;d:\jce1.2.1\lib\jce1_2_1.jar;d:\jce1.2.1\lib\sunjce_provider.jar; XmlEncryptor.java
    
  4. Run the XmlEncryptor program using the classpath illustrated here:
    java -cp .;d:\xerces-1_2_0\xerces.jar;d:\jce1.2.1\lib\jce1_2_1.jar;d:\jce1.2.1\lib\sunjce_provider.jar; XmlEncryptor
    

When run, XmlEncryptor creates two files: XmlEncryptionTestEncryptedNodes.xml and XmlEncryptionTestDecryptedNodes.xml.

Please see the source code of XmlEncryptor.java for descriptions of the coding details.


Note: XmlEncryptor is intended to serve solely as a point of discussion for the XML Encryption Work Group and will only be added to and maintained according to the needs of the Work Group.