Creating a Random Number

Function

This API generates a 512-bit random number.

URI

Requests

Table 2 Request parameters

Parameter

Mandatory

Type

Description

random_data_length

Yes

String

Number of bits of a random number. The value is 512.

sequence

No

String

36-byte serial number of a request message

Example: 919c82d4-8046-4722-9094-35c3c6524cff

Responses

Table 3 Response parameters

Parameter

Mandatory

Type

Description

random_data

Yes

String

Random numbers are expressed in hexadecimal format. Two characters indicate one byte. Length of a random number must be consistent with the random_data_length value entered by a user.

Examples

The following example describes how to create a random number with the length of 512 bits.

Status Codes

Table 4 lists the normal status code returned by the response.
Table 4 Status codes

Status Code

Status

Description

200

OK

Request processed successfully.

Exception status code. For details, see Status Codes.