For symmetric ciphers, mode
(the block cipher mode) is a required field.
For GCM and CCM modes, tag_len
is a required field.
iv
is optional for symmetric ciphers and unused for asymmetric ciphers. If
provided, it will be used as the cipher initialization vector. The length of
iv
must match the initialization vector size for the cipher and mode. If not
provided, a random iv of the correct length is created and returned in the
response.
Objects of type Opaque, EC, or HMAC may not be used with this API.
Uniquely identifies a persisted or transient sobject.
Type of security object.
A cryptographic algorithm.
Plaintext bytes to be encrypted.
Note that when performing format-preserving encryption (i.e., tokenization), the plaintext should be encoded as UTF-8 bytes.
CipherMode
or RsaEncryptionPadding
, depending on the encryption algorithm.
Specifies the Mask Generating Function (MGF) to use.
A hash algorithm.
The initialization vector to use. This is only applicable to modes that take IVs, and will be randomly generated if not specified.
The authenticated data to use. This is only applicable when using authenticated encryption modes (like GCM or CCM).
The length of the authentication tag, in bits, for authenticated encryption modes (i.e., GCM or CCM). For other modes, this field is irrelevant.
The optional label to use. Currently this field only serves as the rsa_oaep_label when the encryption algorithm is RSA and the mode is Oaep. For other modes, providing this field causes a bad request error.
Success result
The ID of the key used for encryption. Returned for non-transient keys.
Encrypted ciphertext bytes.
Note that when performing format-preserving encryption (i.e., tokenization), the ciphertext is encoded as UTF-8 bytes.
The initialization vector used during encryption. This is only applicable for certain symmetric encryption modes.
When using the GCM or CCM modes, the tag is returned from authenticated encryption.