Raul Benito <raul <at> apache.org> writes:

> 
> This way of setting the Provider using the JCEMapper, has some bugs(it
> works for digesting/signing but not for crypt/decrypt).
> Anyway I was thinking of deprecating/removing this methods.
> So if more people use it please raise your hands, soon.
> 
> On 10/22/05, Werner Dittmann <Werner.Dittmann <at> t-online.de> wrote:
> > In WSS4J I use the follwing way to define the provider to XML-SEC:
> >
> > JCEMapper.setProviderId(id)
> >
> > This static method sets the Id to use for SIgnature etc. For
> > XMLCipher you must use different methods, look at that:
> >
> > if (provider == null) {
> >     xmlCipher = XMLCipher.getInstance(symEncAlgo);
> > }
> > else {
> >     xmlCipher = XMLCipher.getProviderInstance(symEncAlgo, provider);
> > }
> >
> > If you like to specify a provider for XMLCipher you have
> > to use a specific getInstance method - see above. The provider
> > in this case is the provider id string, e.g. "BC" for
> > BouncyCastle.
> >
> > regards,
> > Werner


I could not find a way to specify that, for example, algorithm defined as 
http://www.w3.org/2001/04/xmlenc#rsa-1_5, should be instantiated with IBMJCE's 
cipher "RSA". I tried to modify config.xml according to DTD but it doesn't 
seem to work. And I used the method XMLCipher.getProviderInstance(algorithm, 
provider).
Cheers,
Alex



Reply via email to