Generating Random Bytes
Use the post /v1/cckm/oci/ekm/v1/vaults/{vaultId}/generateRandomBytes
API to generate random bytes using HMAC512-DRBG implementation.
When running the API, specify the length of the random bytes to be generated.
The supported scope value is oci_hyok_generateRandomBytes
.
When running the API, {vaultId}
is the resource ID of the external vault on the CipherTrust Manager.
Request Parameters
Parameter | Type | Description |
---|---|---|
opc-request-id | String | Unique identifier for the request. If provided, the returned request ID will include this value. Otherwise, a random request ID will be generated by the service. |
length | integer | Length of the random bytes to be generated (1-65535 bytes). |
Example Request
post https://<Host IP Address>/api/v1/cckm/oci/ekm/v1/vaults/{vaultId}/generateRandomBytes
<authorization token and other headers>
{
"length": <length of random bytes to generate>
}
Example Response
{
"randomBytes": "AAwRhavVBkAAAJNF0nE7tBz/CQDanO33toIAWpw/lCn9GuadiyNNZ2QCmeUksvor8HD00o0TiUHzj6IsDJ5z1j/AEXZrhBtEcz4=",
"length": 32
}
Response Codes
Response Code | Description |
---|---|
201 | Created |
400 | Bad request |
401 | Unauthorized |
404 | Not found |
422 | Unprocessable entity |
500 | Internal server error |
Refer to HTTP status codes for details.