Package com.vonage.client.auth.hashutils
Class AbstractHasher
java.lang.Object
com.vonage.client.auth.hashutils.AbstractHasher
- Direct Known Subclasses:
HmacMd5Hasher,HmacSha1Hasher,HmacSha256Hasher,HmacSha512Hasher
Deprecated.
This class will be made package-private in the next major release.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildHexString(byte[] digest) Deprecated.Deprecated.Calculates hash for string. assume string is UTF-8 encodedabstract StringDeprecated.Calculates hash for string.Deprecated.Calculates hash for string.
-
Constructor Details
-
AbstractHasher
public AbstractHasher()Deprecated.
-
-
Method Details
-
calculate
Deprecated.Calculates hash for string. assume string is UTF-8 encoded- Parameters:
input- string which is going to be encoded into requested format- Returns:
- hashed representation of the input string
- Throws:
NoSuchAlgorithmException- if the algorithm is not available.InvalidKeyException- Only applicable to HMAC encoding types, when a bad key is provided.
-
calculate
public String calculate(String input, String secretKey, String encoding) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException Deprecated.Calculates hash for string.- Parameters:
input- string which is going to be encoded into requested formatsecretKey- The secret key for the inputencoding- The encoding type of the string- Returns:
- hashed representation of the input string
- Throws:
NoSuchAlgorithmException- if the algorithm is not available.UnsupportedEncodingException- if the encoding type is invalidInvalidKeyException- Only applicable to HMAC encoding types, when a bad key is provided.
-
calculate
public abstract String calculate(String input, String encoding) throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException Deprecated.Calculates hash for string.- Parameters:
input- string which is going to be encoded into requested formatencoding- The encoding type of the string- Returns:
- hashed representation of the input string
- Throws:
NoSuchAlgorithmException- if the algorithm is not available.UnsupportedEncodingException- if the encoding type is invalidInvalidKeyException- Only applicable to HMAC encoding types, when a bad key is provided.
-
buildHexString
Deprecated.
-