Creates a keyset based on the specified algorithm type.
Command format
binary NEW_KEYSET(string <key_type>, [string <description>])Parameter descriptions
key_type: Required. The algorithm type used to create a data key. Supported algorithms include AES-GCM-256, AES-SIV-CMAC-128, and AES-SIV-CMAC-256.
description: Optional. The description of the data key.
Return value
A keyset of the BINARY type is returned.
Usage example
select hex(NEW_KEYSET('AES-GCM-256', 'hello world'));The following result is returned.
+------------+
| _c0 |
+------------+
| 0A10577567735A514541554D42776E684C4212580A330A0B4145532D47434D2D323536122017F7A430B9D4B59B55454FD4B486216059F1B748CE0502D901EBEACEAB6569191801200210011A10577567735A514541554D42776E684C4220022A0B68656C6C6F20776F726C64 |
+------------+References
Document | Description |
Instructions on how to use keyset encryption functions. | |
Adds a new key to a keyset and sets the new key as the master key. | |
Converts a BINARY keyset to a readable JSON format to view the keyset details. | |
Converts a JSON keyset to the BINARY type. | |
The system automatically generates a new key and sets it as the master key. | |
Grants the | |
Re-encrypts a wrapped keyset using a specified KMS key. | |
Decrypts an existing encrypted keyset, performs key rotation, and then encrypts the keyset with the new key. | |
Converts a wrapped keyset to a basic keyset to be used as a parameter for encryption and decryption functions. You can also use this function to obtain and save information about the wrapped keyset for maintenance. | |
Encrypts data using a specified keyset. | |
Decrypts data using a specified keyset. |