I did. It is number 6. Quoting Vishal Mahajan <[EMAIL PROTECTED]>:
> Did you add an entry like the following to the > "jre/lib/security/java.security" file before running the sample? > > > security.provider.<n>=org.bouncycastle.jce.provider.BouncyCastleProvider > > Vishal > > [EMAIL PROTECTED] wrote: > > >Hi, > > > >I'm hoping someone can help me with this error. > >I get the following output and error when trying to run the sample > >Encrypter.java: > > > >Data: AES > >Key encryption key stored in file: > c:/SampleCode/XMLencrypt/testXMLenc/kek > >[EMAIL PROTECTED] > >Key: [EMAIL PROTECTED] > > algorithmURI http://www.w3.org/2001/04/xmlenc#tripledes-cbc > >org.apache.xml.security.encryption.XMLEncryptionException: Padding: > >ISO10126Padding not implemented > >Original Exception was javax.crypto.NoSuchPaddingException: Padding: > >ISO10126Padding not implemented > > at org.apache.xml.security.encryption.XMLCipher.getInstance(Unknown > Source) > > at org.apache.xml.security.encryption.XMLCipher.getInstance(Unknown > Source) > > at Encrypter.main(Encrypter.java:171) > >javax.crypto.NoSuchPaddingException: Padding: ISO10126Padding not > >implemented > > at com.sun.crypto.provider.SunJCE_h.b(DashoA6275) > > at com.sun.crypto.provider.DESedeCipher.engineSetPadding(DashoA6275) > > at javax.crypto.Cipher.getInstance(Cipher.java:149) > > at org.apache.xml.security.encryption.XMLCipher.getInstance(Unknown > Source) > > at org.apache.xml.security.encryption.XMLCipher.getInstance(Unknown > Source) > > at Encrypter.main(Encrypter.java:171) > >Exception in thread "main" > > > > > > > >I found this thread: > >http://mail-archives.apache.org/mod_mbox/xml-security-dev/200406.mbox/[EMAIL >PROTECTED] > > > >But none of that helped. It didn't seem to help the other guy either as > >there is another thread 10 days later where he still talks about the > >problem. His email is now defunct so I can't ask him how he eventually > >solved it or if he did. > > > >Any ideas? > > > >I've got the bouncy castle provider jar in <java_home>\lib\endorsed. > >That location is also in my classpath. > > > >Also, I get the following output from the following code: > > > >------output---------- > >Cipher provider: SunJCE version 1.42 > >Cipher algorithm: DES > > > >--------code--------- > > > >import javax.crypto.Cipher; > > > >import javax.crypto.NoSuchPaddingException; > > > >import java.security.Security; > > > >import java.security.NoSuchAlgorithmException; > > > >public class DESCipherGenerator { > > > > public static void main(String[] args) { > > > > //Security.addProvider (new com.sun.crypto.provider.SunJCE()); > > Security.addProvider(new > >org.bouncycastle.jce.provider.BouncyCastleProvider()); > > > > try { > > > > Cipher cipher = Cipher.getInstance("DES"); > > > > System.out.println("Cipher provider: " > >+ cipher.getProvider()); > > > > System.out.println("Cipher algorithm: " > >+ cipher.getAlgorithm()); > > > > } > > > > catch (NoSuchAlgorithmException e) { > > > > e.printStackTrace(); > > > > } > > > > catch (NoSuchPaddingException e) { > > > > e.printStackTrace(); > > > > } > > > > } > > > >Kevin > > > > > > > > > > > >