com.sipresponse.flibblecallmgr.internal.util
Class MessageDigestAlgorithm

java.lang.Object
  extended by com.sipresponse.flibblecallmgr.internal.util.MessageDigestAlgorithm

public class MessageDigestAlgorithm
extends java.lang.Object

The class takes standard Http Authentication details and returns a response according to the MD5 algorithm.

Version:
1.0
Author:
Emil Ivov < emcho@dev.java.net >

Constructor Summary
MessageDigestAlgorithm()
           
 
Method Summary
static java.lang.String calculateResponse(java.lang.String algorithm, java.lang.String username_value, java.lang.String realm_value, java.lang.String passwd, java.lang.String nonce_value, java.lang.String nc_value, java.lang.String cnonce_value, java.lang.String Method, java.lang.String digest_uri_value, java.lang.String entity_body, java.lang.String qop_value)
          Calculates a response an http authentication response in accordance with rfc2617.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDigestAlgorithm

public MessageDigestAlgorithm()
Method Detail

calculateResponse

public static java.lang.String calculateResponse(java.lang.String algorithm,
                                                 java.lang.String username_value,
                                                 java.lang.String realm_value,
                                                 java.lang.String passwd,
                                                 java.lang.String nonce_value,
                                                 java.lang.String nc_value,
                                                 java.lang.String cnonce_value,
                                                 java.lang.String Method,
                                                 java.lang.String digest_uri_value,
                                                 java.lang.String entity_body,
                                                 java.lang.String qop_value)
Calculates a response an http authentication response in accordance with rfc2617.

This method was copied from the Sip Communicator project (package net.java.sip.communicator.sip.security, its author is Emil Ivov) and slightly modified here (to remove console/log messages). Thanks for making it publicly available. It is licensed under the Apache Software License, Version 1.1 Copyright (c) 2000.

Parameters:
algorithm - MD5 or MD5-sess)
username_value - username_value (see rfc2617)
realm_value - realm_value
passwd - passwd
nonce_value - nonce_value
cnonce_value - cnonce_value
Method - method
digest_uri_value - uri_value
entity_body - entity_body
qop_value - qop
Returns:
a digest response as defined in rfc2617
Throws:
java.lang.NullPointerException - in case of incorrectly null parameters.