otcextensions.sdk.kms.v1.data_key¶
The KMS DEK Class¶
The DataKey
class inherits from
Resource
.
-
class
otcextensions.sdk.kms.v1.data_key.
DataKey
(_synchronized=False, connection=None, **attrs)¶ The base resource
- Parameters
_synchronized (bool) – This is not intended to be used directly. See
new()
andexisting()
.connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of
self._connection
in Resource code should protect itself with a check for None.
-
key_id
¶ Secret key (CMK) ID Type:str
-
encryption_context
¶ Encryption context Dict (as string) describing resource context information Type:str
-
datakey_length
¶ Datakey length Type:int
-
datakey_plain_length
¶ Datakey plain length Type:int
-
datakey_cipher_length
¶ Datakey plain length Type:int
-
sequence
¶ Sequence Type:str
-
plain_text
¶ Plain text of the data key Type:str
-
cipher_text
¶ Cipher text of the data key and encrypted_value Type:str
-
encrypt
(session)¶ Encrypt DEK
- Encrypt DEK with CMK. Requires plain_text to be set with the DEK’s
plain value. Populates encrypted_cipher_text attribute with the generated cipher in hex (2 chars per byte)
-
decrypt
(session)¶ Decrypt Key
Decrypts cipher_text into plain_text with the given CMK