KmsEncryptRequest¶
Namespace CryptoService.Sdk.
The body of POST /v2/kms/encrypt. Build it with KmsEncryptRequest.FromText or KmsEncryptRequest.FromBytes, which state the encoding; the server never guesses it.
Methods¶
FromBytes(String, ReadOnlySpan<Byte>)¶
A request to encrypt bytes, sent as hex (encoding: hex).
| Parameter | Description |
|---|---|
keyId |
The managed key's ID. |
bytes |
The bytes. |
Returns: The request.
FromText(String, String)¶
A request to encrypt UTF-8 text (encoding: utf8).
| Parameter | Description |
|---|---|
keyId |
The managed key's ID. |
text |
The text. |
Returns: The request.
Properties¶
Context¶
The encryption context, or null.
Encoding¶
utf8 or hex; null means utf8.
KeyId¶
The managed key's ID.
Plaintext¶
The plaintext, in KmsEncryptRequest.Encoding.
Provider¶
The KMS provider, or null for the server's default.