> Is it possible to change the algorithm which calculates the digest?

No, you must use SHA-1, as this is what the UsernameToken Profile 1.1
mandates. Could you explain the use-case you have in more detail?

Colm.

2011/4/27 Steffen Schäffner <[email protected]>:
> Is it possible to change the algorithm which calculates the digest?
>
> Currently I am doing it this way:
>
> Endpoint endpoint = client.getEndpoint();
> Map<String, Object> properties = new HashMap<String, Object>();
> properties.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
> properties.put(WSHandlerConstants.USER, username);
> properties.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST);
> properties.put(WSHandlerConstants.PW_CALLBACK_CLASS, 
> MyPasswordCallbackHandler.class.getName());
> WSS4JOutInterceptor wssOut = new WSS4JOutInterceptor(properties);
> endpoint.getOutInterceptors().add(wssOut);
>
> // MyPasswordCallbackHandler
>
> @Override
> public void handle(Callback[] callbacks) throws IOException, 
> UnsupportedCallbackException {
>      WSPasswordCallback wsPasswordCallback = (WSPasswordCallback) 
> callbacks[0];
>      wsPasswordCallback.setPassword(password);
> }
>
> Are there any alternative ways to calculate the digest?
>
> Thanks!
>

Reply via email to