Error while encrypting the xml file...pls help
i download the code for encryption of xml file..
but i am getting following error..
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.xml.security.Init.<clinit>(Unknown Source)
at EncryptTool.<clinit>(EncryptTool.java:51)
so, what is that? pls help me..
there is a code for xml encryption:
http://www.devx.com/xml/Article/28701/0/page/6
but, when i execute that i got error.....
so, pls anyone can tell me all the procedures to execute that program..
which jar files need to be download....
pls help me.....
Error during decryption of xml file
when i am decryption file, it is giving me exception :
Exception in thread "main" java.lang.IllegalArgumentException: No attributes are implemented
at org.apache.crimson.jaxp.DocumentBuilderFactoryImpl.setAttribute(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher$Serializer.deserialize(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher.decryptElement(Unknown Source)
at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown Source)
at DecryptTool.main(DecryptTool.java:151)
and code is :
Document document = loadEncryptedFile(args[0]);
String namespaceURI = EncryptionConstants.EncryptionSpecNS;
String localName = EncryptionConstants._TAG_ENCRYPTEDDATA;
Element encryptedDataElement =
(Element)document.getElementsByTagNameNS(namespaceURI,
localName).item(0);
Key keyEncryptKey = loadKeyEncryptionKey();
XMLCipher xmlCipher = XMLCipher.getInstance();
xmlCipher.init(XMLCipher.DECRYPT_MODE, null);
xmlCipher.setKEK(keyEncryptKey);
xmlCipher.doFinal(document, encryptedDataElement);
so, what is that ?
pls , help me.......