Package com.vonage.client.auth.hashutils
Class HmacSha512Hasher
java.lang.Object
com.vonage.client.auth.hashutils.AbstractHasher
com.vonage.client.auth.hashutils.HmacSha512Hasher
Deprecated.
This class will be made package-private in the next major release.
Contains utility methods that use HMAC SHA-512 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
-
HmacSha512Hasher
public HmacSha512Hasher()Deprecated.
-
-
Method Details
-
calculate
public String calculate(String input, String secretKey, String encoding) throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException Deprecated.Calculates HMAC SHA-512 hash for string.- Overrides:
calculatein classAbstractHasher- Parameters:
input- string which is going to be encoded into HMAC SHA-512 formatsecretKey- The key used for initialization of the algorithmencoding- character encoding of the string which is going to be encoded into HMAC SHA-512 format- Returns:
- HMAC SHA-512 representation of the input string
- Throws:
NoSuchAlgorithmException- if the HMAC SHA-512 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 SHA-512 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 SHA-512 formatencoding- character encoding of the string which is going to be encoded into HMAC SHA-512 format- Returns:
- HMAC SHA-512 representation of the input string
- Throws:
NoSuchAlgorithmException- if the HMAC SHA-512 algorithm is not available.UnsupportedEncodingException- if the specified encoding is unavailable.InvalidKeyException- if key is invalid
-