You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by Dimitri Idessis <Di...@gmx.de> on 2006/02/23 20:23:21 UTC

wss4j: encryption

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: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org