electric.util.http
Class DigestUtil

java.lang.Object
  extended byelectric.util.http.DigestUtil

public final class DigestUtil
extends java.lang.Object

DigestUtil defines a set of utility methods for dealing with HTTP Digest Authentication (rfc2617)

Author:
webMethods

Constructor Summary
DigestUtil()
           
 
Method Summary
static java.lang.String calculateDigest(AuthHeaderData authData, java.lang.String password)
          Parse a WWW-Authenticate header.
static java.lang.String digestHexFormat(byte[] byteArray)
          Convert a byte array into lower case hex characters including any leading 0's.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DigestUtil

public DigestUtil()
Method Detail

digestHexFormat

public static java.lang.String digestHexFormat(byte[] byteArray)
Convert a byte array into lower case hex characters including any leading 0's. Integer.toHexString doesn't give us leading zero's, as required by rfc2617. The name is from the sample implementation in the spec.

Parameters:
byteArray - The array of bytes to be converted

calculateDigest

public static java.lang.String calculateDigest(AuthHeaderData authData,
                                               java.lang.String password)
                                        throws java.security.NoSuchAlgorithmException
Parse a WWW-Authenticate header. Not all fields will be present in all headers. See rfc2617 3.2.1 for details.

Parameters:
authData -
password -
Throws:
java.security.NoSuchAlgorithmException


copyright© 2001-2004 by webMethods All Rights Reserved.