Updated on 2024-07-08 GMT+08:00

Calculating an SHA256 Hash

Function

This API is used to calculate SHA256 values. The value of the encrypted field must be in the UUID format.

Calling Method

For details, see Calling APIs.

URI

GET /v3/sha256/{key}

Table 1 Path parameter

Parameter

Mandatory

Type

Description

key

Yes

String

The keyword. The value of the encrypted field must be in the UUID format.

Minimum length: 1 character

Maximum length: 16,384 characters

Request

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

The user token.

The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Minimum length: 1 character

Maximum length: 16,384 characters

Response

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

value

String

The SHA256 hash value.

Minimum length: 1 character

Maximum length: 1,048,576 characters

Example Request

This example calculates an SHA256 hash.

GET https://{endpoint}/v3/sha256/xxxxx

Example Response

Status code: 200

OK

{
  "value" : "xxxxxxxxxxx"
}

Status Codes

Status Code

Description

200

Response returned.

Error Codes

For details, see Error Codes.