Class AuthUtils
- java.lang.Object
-
- fish.payara.microprofile.config.extensions.aws.client.AuthUtils
-
public abstract class AuthUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static StringbytesToHex(byte[] bytes)Convert byte array to Hex.protected static StringgenerateHex(String data)Generate Hex code of String.protected static byte[]getSignatureKey(String key, String date, String regionName, String serviceName)Generate AWS signature key.protected static StringgetTimestamp(Date date)Get timestamp.protected static byte[]HmacSHA256(byte[] key, String data)Apply HmacSHA256 on data using given key.
-
-
-
Method Detail
-
generateHex
protected static String generateHex(String data)
Generate Hex code of String.- Parameters:
data-- Returns:
-
bytesToHex
protected static String bytesToHex(byte[] bytes)
Convert byte array to Hex. This method is kept here to facilitate the unit test- Parameters:
bytes-- Returns:
-
HmacSHA256
protected static byte[] HmacSHA256(byte[] key, String data) throws ExceptionApply HmacSHA256 on data using given key.- Parameters:
data-key-- Returns:
- Throws:
Exception
-
getSignatureKey
protected static byte[] getSignatureKey(String key, String date, String regionName, String serviceName) throws Exception
Generate AWS signature key.- Parameters:
key-date-regionName-serviceName-- Returns:
- Throws:
Exception
-
-