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