Package com.wowza.util
Class MD5DigestUtils
Object
com.wowza.util.MD5DigestUtils
MD5DigestUtils: MD5 hash utilities.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateAuth(String method, String uri, String username, String password, String realm, String nonce) Generate an HTTP authorization responsestatic StringgenerateAuth(String a2Hash, String a1Hash, String realm, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization responsestatic StringgenerateAuth(String method, String uri, String a1Hash, String realm, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization responsestatic StringgenerateAuth(String method, String uri, String username, String password, String realm, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization responsestatic StringgenerateAuthHTTP(String method, String uri, String a1Hash, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization responsestatic StringgenerateAuthHTTP(String method, String uri, String username, String password, String realm, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization responsestatic StringgenerateHash(String value) Generate MD5 hashstatic byte[]generateHashBytes(byte[] value) Generate MD5 hashstatic byte[]generateHashBytes(String value) Generate MD5 hashstatic boolean
-
Field Details
-
md5Digest
-
md5Lock
-
-
Constructor Details
-
MD5DigestUtils
public MD5DigestUtils()
-
-
Method Details
-
generateAuth
public static String generateAuth(String method, String uri, String username, String password, String realm, String nonce) Generate an HTTP authorization response- Parameters:
method- methoduri- URIusername- usernamepassword- passwordrealm- realmnonce- nonce- Returns:
- auth response
-
generateAuth
public 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- Parameters:
method- methoduri- URIusername- usernamepassword- passwordrealm- realmnonce- nonceqop- qopnonceCount- nonceCountcnonce- cnonce- Returns:
- auth response
-
generateAuthHTTP
public 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- Parameters:
method- methoduri- URIusername- usernamepassword- passwordrealm- realmnonce- nonceqop- qopnonceCount- nonceCountcnonce- cnonce- Returns:
- response
-
generateAuthHTTP
public static String generateAuthHTTP(String method, String uri, String a1Hash, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization response- Parameters:
method- The HTTP methoduri- The URIa1Hash- The a1 hashnonce- nonceqop- qopnonceCount- nonceCountcnonce- cnonce- Returns:
- response
-
generateAuth
public static String generateAuth(String method, String uri, String a1Hash, String realm, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization response- Parameters:
method- methoduri- URIa1Hash- a1Hashrealm- realmnonce- nonceqop- qopnonceCount- nonceCountcnonce- cnonce- Returns:
- auth
-
generateAuth
public static String generateAuth(String a2Hash, String a1Hash, String realm, String nonce, String qop, String nonceCount, String cnonce) Generate an HTTP authorization response- Parameters:
a2Hash- a2Hasha1Hash- a1Hashrealm- realmnonce- nonceqop- qopnonceCount- nonceCountcnonce- cnonce- Returns:
- auth
-
generateHashBytes
public static byte[] generateHashBytes(byte[] value) Generate MD5 hash- Parameters:
value- byte array to hash- Returns:
- byte array result
-
generateHashBytes
Generate MD5 hash- Parameters:
value- in string converted to byte array (UTF-8)- Returns:
- byte array result
-
generateHash
Generate MD5 hash- Parameters:
value- in string converted to byte array (UTF-8)- Returns:
- hash as binhex string
-
validate
-