public class MD5DigestUtils
extends Object
MD5DigestUtils: MD5 hash utilities.
| Modifier and Type | Field | Description |
|---|---|---|
protected static java.security.MessageDigest |
md5Digest |
|
protected static Object |
md5Lock |
| Constructor | Description |
|---|---|
MD5DigestUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static String |
generateAuth(String method,
String uri,
String username,
String password,
String realm,
String nonce) |
Generate an HTTP authorization response
|
static String |
generateAuth(String a2Hash,
String a1Hash,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce) |
Generate an HTTP authorization response
|
static String |
generateAuth(String method,
String uri,
String a1Hash,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce) |
Generate an HTTP authorization response
|
static String |
generateAuth(String method,
String uri,
String username,
String password,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce) |
Generate an HTTP authorization response
|
static String |
generateAuthHTTP(String method,
String uri,
String a1Hash,
String nonce,
String qop,
String nonceCount,
String cnonce) |
Generate an HTTP authorization response
|
static String |
generateAuthHTTP(String method,
String uri,
String username,
String password,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce) |
Generate an HTTP authorization response
|
static String |
generateHash(String value) |
Generate MD5 hash
|
static byte[] |
generateHashBytes(byte[] value) |
Generate MD5 hash
|
static byte[] |
generateHashBytes(String value) |
Generate MD5 hash
|
protected static java.security.MessageDigest md5Digest
protected static Object md5Lock
public static String generateAuth(String method,
String uri,
String username,
String password,
String realm,
String nonce)
method - methoduri - URIusername - usernamepassword - passwordrealm - realmnonce - noncepublic static String generateAuth(String a2Hash,
String a1Hash,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce)
a2Hash - a2Hasha1Hash - a1Hashrealm - realmnonce - nonceqop - qopnonceCount - nonceCountcnonce - cnoncepublic static String generateAuth(String method,
String uri,
String a1Hash,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce)
method - methoduri - URIa1Hash - a1Hashrealm - realmnonce - nonceqop - qopnonceCount - nonceCountcnonce - cnoncepublic static String generateAuth(String method,
String uri,
String username,
String password,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce)
method - methoduri - URIusername - usernamepassword - passwordrealm - realmnonce - nonceqop - qopnonceCount - nonceCountcnonce - cnoncepublic static String generateAuthHTTP(String method,
String uri,
String a1Hash,
String nonce,
String qop,
String nonceCount,
String cnonce)
method - methoduri - URIusername - usernamepassword - passwordrealm - realmnonce - nonceqop - qopnonceCount - nonceCountcnonce - cnoncepublic static String generateAuthHTTP(String method,
String uri,
String username,
String password,
String realm,
String nonce,
String qop,
String nonceCount,
String cnonce)
method - methoduri - URIusername - usernamepassword - passwordrealm - realmnonce - nonceqop - qopnonceCount - nonceCountcnonce - cnoncepublic static String generateHash(String value)
value - in string converted to byte array (UTF-8)public static byte[] generateHashBytes(byte[] value)
value - byte array to hashpublic static byte[] generateHashBytes(String value)
value - in string converted to byte array (UTF-8)