Torch Object Storage
Function name | Description |
Function name | Description |
UriEncode() | Encode the string with the following restrictions:
|
Lowercase() | Converts a string to lowercase. |
Hex() | Performs hexadecimal encoding. |
SHA256Hash() | Implements the SHA-256 algorithm. |
HMAC-SHA256() | Implements the HMAC-SHA256 algorithm. |
Trim() | Removes whitespaces from both sides of a string. |
Parameter | Description |
Parameter | Description |
HTTPMethod | The method used by the HTTP request, for example, PUT, GET, HEAD, or DELETE. |
CanonicalURI | UriEncode(<PATH>)
|
CanonicalQueryString | Encoding format of query parameters in the request: UriEncode(<QueryParam1>) + '=' + UriEncode(<value>) + '&' + UriEncode(<QueryParam2>) + '=' + UriEncode(<value>) + '&' + ... UriEncode(<QueryParamN>) + '=' + UriEncode(<value>) tip
|
CanonicalHeaders | Encoding format for headers in the request: Lowercase(<HeaderName1>) + ':' + Trim(<value>) + '\n' Lowercase(<HeaderName2>) + ':' + Trim(<value>) + '\n' ... Lowercase(<HeaderNameN>) +':' + Trim(<value>) + '\n' tip
|
SignedHeaders | List the headers used for signature calculation: Lowercase(<HeaderName1>) + ';' + Lowercase(<HeaderName2>) + ... + Lowercase(<HeaderNameN>) tip
|
HashedPayload | Hex(SHA256Hash(<payload>)) represents the hexadecimal result of the SHA256 calculation on the request payload. tip
|
Parameter | Note |
Parameter | Note |
Algorithm | The signing algorithm, currently only supporting HMAC-SHA256. |
RequestDate | Request UTC time using the following format: yyyyMMddTHHmmssZ. |
CredentialScope | Credential scope value, formatted as: yyyyMMdd/region/tos/request. |
CanonicalRequest | The result of the normalized request from the previous section. |
Parameter | Value |
Parameter | Value |
Bucket name | examplebucket |
Object name | exampleobject |
Region | cn-beijing |
Time | Sat, 1 Jan 2022 00:00:00 GMT |
AccessKeyId | testAK |
SecretAccessKey | testSK |