net.java.sip.communicator.impl.protocol.sip.security
Class MessageDigestAlgorithm
java.lang.Object
net.java.sip.communicator.impl.protocol.sip.security.MessageDigestAlgorithm
public class MessageDigestAlgorithm
- extends Object
The class takes standard Http Authentication details and returns a response
according to the MD5 algorithm
- Author:
- Emil Ivov
|
Method Summary |
(package private) static String |
calculateResponse(String algorithm,
String username_value,
String realm_value,
String passwd,
String nonce_value,
String nc_value,
String cnonce_value,
String method,
String digest_uri_value,
String entity_body,
String qop_value)
Calculates an http authentication response in accordance with rfc2617. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageDigestAlgorithm
public MessageDigestAlgorithm()
calculateResponse
static String calculateResponse(String algorithm,
String username_value,
String realm_value,
String passwd,
String nonce_value,
String nc_value,
String cnonce_value,
String method,
String digest_uri_value,
String entity_body,
String qop_value)
- Calculates an http authentication response in accordance with rfc2617.
- Parameters:
algorithm - a string indicating a pair of algorithms (MD5 (default),
or MD5-sess) used to produce the digest and a checksum.username_value - username_value (see rfc2617)realm_value - A string that has been displayed to the user in order
to determine the context of the username and password to use.passwd - the password to encode in the challenge response.nonce_value - A server-specified data string provided in the
challenge.cnonce_value - an optional client-chosen value whose purpose is
to foil chosen plaintext attacks.method - the SIP method of the request being challenged.digest_uri_value - the value of the "uri" directive on the
Authorization header in the request.entity_body - the entity-bodyqop_value - Indicates what "quality of protection" the client has
applied to the message.nc_value - the hexadecimal count of the number of requests
(including the current request) that the client has sent with the nonce
value in this request.
- Returns:
- a digest response as defined in rfc2617
- Throws:
NullPointerException - in case of incorrectly null parameters.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.