public class HTTPDigestUtil extends Object
Constructor and Description |
---|
HTTPDigestUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
clientResponseValue(Digest digest,
char[] password)
Given the digest, construct the client response value
|
static String |
convertBytesToHex(byte[] bytes)
Convert a byte array to hex
|
static Digest |
digest(String[] tokens)
Construct a
DigestHolder from the tokens |
static String |
extract(String token,
String key)
Given a digest token, extract the value
|
static boolean |
matchCredential(Digest digest,
char[] password)
Match the Client Response value with a generated digest based on the password
|
static byte[] |
md5(String str)
Determine the message digest
|
static String[] |
quoteTokenize(String clientResponse)
Given the standard client response in HTTP/Digest mechanism, generate a set of string tokens that retains the quotes
|
static String |
userName(String token) |
public static String[] quoteTokenize(String clientResponse)
clientResponse
- public static String extract(String token, String key)
token
- key
- public static Digest digest(String[] tokens)
DigestHolder
from the tokenstokens
- public static byte[] md5(String str)
str
- FormatException
public static String clientResponseValue(Digest digest, char[] password)
digest
- password
- FormatException
public static boolean matchCredential(Digest digest, char[] password)
digest
- password
- FormatException
public static String convertBytesToHex(byte[] bytes)
bytes
- Copyright © 2018 JBoss by Red Hat. All rights reserved.