Package com.tencentcloudapi.common
Class Sign
- java.lang.Object
-
- com.tencentcloudapi.common.Sign
-
public class Sign extends Object
-
-
Constructor Summary
Constructors Constructor Description Sign()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static String
buildParamStr(TreeMap<String,String> requestParams, String requestMethod)
static byte[]
hmac256(byte[] key, String msg)
static String
makeSignPlainText(TreeMap<String,String> requestParams, String reqMethod, String host, String path)
static String
sha256Hex(byte[] b)
static String
sha256Hex(String s)
static String
sign(String secretKey, String sigStr, String sigMethod)
-
-
-
Method Detail
-
sign
public static String sign(String secretKey, String sigStr, String sigMethod) throws TencentCloudSDKException
- Throws:
TencentCloudSDKException
-
makeSignPlainText
public static String makeSignPlainText(TreeMap<String,String> requestParams, String reqMethod, String host, String path)
-
buildParamStr
protected static String buildParamStr(TreeMap<String,String> requestParams, String requestMethod)
-
sha256Hex
public static String sha256Hex(String s) throws TencentCloudSDKException
- Throws:
TencentCloudSDKException
-
sha256Hex
public static String sha256Hex(byte[] b) throws TencentCloudSDKException
- Throws:
TencentCloudSDKException
-
hmac256
public static byte[] hmac256(byte[] key, String msg) throws TencentCloudSDKException
- Throws:
TencentCloudSDKException
-
-