public class Client extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ALGORITHM_NAME |
static String |
HASH_SHA256 |
static String |
HASH_SM3 |
static String |
HMAC_SHA256 |
static String |
HMAC_SM3 |
static String |
PEM_BEGIN |
static String |
PEM_END |
static String |
RSA_SHA256 |
static String |
SEPARATOR |
static String |
URL_ENCODING |
static String |
UTF8 |
| Constructor and Description |
|---|
Client() |
| Modifier and Type | Method and Description |
|---|---|
static String |
arrayToStringWithSpecifiedStyle(Object array,
String prefix,
String style)
Parse array into a string with specified style
|
protected static String |
checkRSASecret(String secret) |
static void |
convert(com.aliyun.tea.TeaModel body,
com.aliyun.tea.TeaModel content)
Convert all params of body other than type of readable into content
|
static String |
getAuthorization(com.aliyun.tea.TeaRequest request,
String signAlgorithm,
String payload,
String accessKey,
String secret) |
protected static String |
getCanonicalizedHeaders(Map<String,String> headers) |
protected static Map<String,String> |
getCanonicalizedHeadersMap(Map<String,String> headers) |
protected static String |
getCanonicalizedQueryString(StringBuilder sb,
Map<String,String> query,
String[] keys) |
protected static String |
getCanonicalizedQueryStringForROA(StringBuilder sb,
Map<String,String> query,
String[] keys) |
protected static String |
getCanonicalizedResource(Map<String,String> query) |
protected static String |
getCanonicalizedResource(String pathname,
Map<String,String> query) |
static String |
getEncodeParam(String param) |
static String |
getEncodePath(String path) |
static String |
getEndpoint(String endpoint,
boolean useAccelerate,
String endpointType) |
static String |
getROASignature(String stringToSign,
String secret)
Get signature according to stringToSign, secret
|
static String |
getRPCSignature(Map<String,String> signedParams,
String method,
String secret)
Get signature according to signedParams, method and secret
|
static String |
getStringToSign(com.aliyun.tea.TeaRequest request)
Get the string to be signed according to request
|
static String |
getTimestamp()
Get timestamp
|
static byte[] |
hash(byte[] raw,
String signAlgorithm) |
static String |
hexEncode(byte[] raw) |
static Map<String,Object> |
parseToMap(Object o) |
static String |
percentEncode(String value) |
static Map<String,String> |
query(Map<String,?> filter)
Parse filter into a object which's type is map[string]string
|
static byte[] |
SignatureMethod(String stringToSign,
String secret,
String signAlgorithm) |
static String |
toForm(Map<String,?> filter)
Parse filter into a form string
|
public static final String SEPARATOR
public static final String URL_ENCODING
public static final String ALGORITHM_NAME
public static final String HASH_SHA256
public static final String HASH_SM3
public static final String HMAC_SHA256
public static final String RSA_SHA256
public static final String HMAC_SM3
public static final String UTF8
public static final String PEM_BEGIN
public static final String PEM_END
public static void convert(com.aliyun.tea.TeaModel body,
com.aliyun.tea.TeaModel content)
throws Exception
body - body Modelcontent - content ModelExceptionpublic static String getStringToSign(com.aliyun.tea.TeaRequest request) throws Exception
request - which contains signed messagesExceptionprotected static Map<String,String> getCanonicalizedHeadersMap(Map<String,String> headers)
protected static String getCanonicalizedQueryString(StringBuilder sb, Map<String,String> query, String[] keys) throws Exception
Exceptionprotected static String getCanonicalizedQueryStringForROA(StringBuilder sb, Map<String,String> query, String[] keys) throws Exception
Exceptionprotected static String getCanonicalizedResource(Map<String,String> query) throws Exception
Exceptionprotected static String getCanonicalizedResource(String pathname, Map<String,String> query) throws Exception
Exceptionpublic static String getROASignature(String stringToSign, String secret) throws Exception
stringToSign - the signed stringsecret - accesskey secretExceptionpublic static String toForm(Map<String,?> filter) throws Exception
filter - objectExceptionpublic static String getTimestamp() throws Exception
Exceptionpublic static Map<String,String> query(Map<String,?> filter) throws Exception
filter - query paramExceptionpublic static String getRPCSignature(Map<String,String> signedParams, String method, String secret) throws Exception
signedParams - params which need to be signedmethod - http method e.g. GETsecret - AccessKeySecretExceptionpublic static String percentEncode(String value) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static String arrayToStringWithSpecifiedStyle(Object array, String prefix, String style) throws Exception
array - the arrayprefix - the prefix stringExceptionpublic static String getEndpoint(String endpoint, boolean useAccelerate, String endpointType)
public static String hexEncode(byte[] raw)
public static String getAuthorization(com.aliyun.tea.TeaRequest request, String signAlgorithm, String payload, String accessKey, String secret) throws Exception
Exceptionpublic static byte[] SignatureMethod(String stringToSign, String secret, String signAlgorithm) throws Exception
Exceptionpublic static String getEncodePath(String path) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static String getEncodeParam(String param) throws UnsupportedEncodingException
UnsupportedEncodingExceptionCopyright © 2021. All rights reserved.