Hi

I try to come forth with my test program for encryption with wss4j and it
seems like this using an certificate with rsa key:

WSEncryptBody encryptor = new WSEncryptBody();
Merlin crypto = new Merlin(null);
KeyStore keyStore = c.loadKeyStore("keystore.jks", "pass".toCharArray());
Certificate cert = keyStore.getCertificate("cryptkey");
encryptor.setUseThisCert((X509Certificate) cert);
Document cryptDoc = encryptor.build(addedDoc, crypto);

and i get this exception:
java.lang.IllegalArgumentException: can't support mode ECB
     
at
org.bouncycastle.jce.provider.JCERSACipher.engineSetMod(JCERSACipher.java:112)

can somebody help me and tell why i do get this exception or send me an easy
example for hybrid encryption with wss4j.

-- 
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to