org.cafesip.sipunit
Class MessageDigestAlgorithm
java.lang.Object
org.cafesip.sipunit.MessageDigestAlgorithm
public class MessageDigestAlgorithm
- extends java.lang.Object
FOR INTERNAL USE, but available to test programs if needed. The class takes
standard Http Authentication details and returns a response according to the
MD5 algorithm.
This class 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.
|
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 |
MessageDigestAlgorithm
public MessageDigestAlgorithm()
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_valuepasswd - passwdnonce_value - nonce_valuecnonce_value - cnonce_valueMethod - methoddigest_uri_value - uri_valueentity_body - entity_bodyqop_value - qop
- Returns:
- a digest response as defined in rfc2617
- Throws:
java.lang.NullPointerException - in case of incorrectly null parameters.
http://www.cafesip.org