esx kms key operation: encrypt
Encrypt plaintext.
Request:
HTTP request
POST https://{server}/rest/esx/kms/key-operation?action=encrypt
Request Body Structure:
{
"provider" : "obj-103",
"plaintext" : "secret string"
}
"provider" : "obj-103",
"plaintext" : "secret string"
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
provider | string | Identifier of the Key Provider. |
plaintext | secret | Plaintext to encrypt. |
Response:
HTTP Status Code: 200
Representation:
{
"value" : {
"ciphertext" : "string"
}
}
"value" : {
"ciphertext" : "string"
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | encrypt_result | Encrypted plaintext. |
value.ciphertext | string | The encrypted data. Additional information is encoded in the ciphertext needed for decryption. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
400 | invalid_argument | if the arguments are invalid. |
404 | not_found | if the provider is not found. |
401 | unauthenticated | if the caller is not authenticated. |
403 | unauthorized | if the caller is not authorized. |
500 | error | if any other error occurs. |