Creating a Random Number
Function
This API generates a random number that is 8 bits to 8192 bits long.
URI
Requests
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
random_data_length |
Yes |
String |
The value is a multiple of 8, in the range 8 to 8192. |
sequence |
No |
String |
36-byte serial number of a request message Example: 919c82d4-8046-4722-9094-35c3c6524cff |
Responses
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.
- Example request
{ "random_data_length": "512" }
- Example response
{ "random_data": "5791C223E87124AB9FC29B5A8AC60BE4B98D168F47A58BB2A88833E40D6ED32D57E2AAB5410492EB25096873F9CE3D45E0D22F820A5AB4EEADC33A1A6AE780F1" }
or
{ "error": { "error_code": "KMS.XXXX", "error_msg": "XXX" } }
Status Codes
Exception status code. For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot