Package com.vonage.client.auth.hashutils
Class HmacMd5Hasher
java.lang.Object
com.vonage.client.auth.hashutils.AbstractHasher
com.vonage.client.auth.hashutils.HmacMd5Hasher
Deprecated.
This class will be made package-private in the next major release.
Contains utility methods that use HMAC MD-5 hashing. The class uses STANDARD JVM crypto Hmac SHA-512 algorithm.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.vonage.client.auth.hashutils.AbstractHasher
buildHexString, calculate
-
Constructor Details
-
HmacMd5Hasher
public HmacMd5Hasher()Deprecated.
-
-
Method Details
-
calculate
public String calculate(String input, String secretKey, String encoding) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException Deprecated.Calculates HMAC MD-5 hash for string.- Overrides:
calculatein classAbstractHasher- Parameters:
input- string which is going to be encoded into HMAC MD-5 formatsecretKey- The key used for initialization of the algorithmencoding- character encoding of the string which is going to be encoded into HMAC MD-5 format- Returns:
- HMAC MD-5 representation of the input string
- Throws:
NoSuchAlgorithmException- if the HMAC MD-5 algorithm is not available.UnsupportedEncodingException- if the specified encoding is unavailable.InvalidKeyException- Only applicable to HMAC encoding types, when a bad key is provided.
-
calculate
public String calculate(String input, String encoding) throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException Deprecated.Calculates HMAC MD-5 hash for string. Secret key that is supplied here is the input itself.- Specified by:
calculatein classAbstractHasher- Parameters:
input- string which is going to be encoded into HMAC MD-5 formatencoding- character encoding of the string which is going to be encoded into HMAC MD-5 format- Returns:
- HMAC MD-5 representation of the input string
- Throws:
NoSuchAlgorithmException- if the HMAC MD-5 algorithm is not available.UnsupportedEncodingException- if the specified encoding is unavailable.InvalidKeyException- if key is invalid
-