mirror of
https://github.com/openkmip/pykmip
synced 2025-12-20 10:13:18 +00:00
Add Encrypt support to the clients
This change adds Encrypt operation support to the KMIPProxy and ProxyKmipClient clients, including unit tests to cover the new functionality. Extensive documentation has been added to the header comments for the new client methods detailing the expected input parameters and return values. This approach should be followed for all new client additions going forward.
This commit is contained in:
@@ -139,6 +139,25 @@ class KmipClient:
|
||||
"""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def encrypt(self, data, uid=None, cryptographic_parameters=None,
|
||||
iv_counter_nonce=None):
|
||||
"""
|
||||
Encrypt data using the specified encryption key and parameters.
|
||||
|
||||
Args:
|
||||
data (bytes): The bytes to encrypt. Required.
|
||||
uid (string): The unique ID of the encryption key to use.
|
||||
Optional, defaults to None.
|
||||
cryptographic_parameters (dict): A dictionary containing various
|
||||
cryptographic settings to be used for the encryption.
|
||||
Optional, defaults to None.
|
||||
iv_counter_nonce (bytes): The bytes to use for the IV/counter/
|
||||
nonce, if needed by the encryption algorithm and/or cipher
|
||||
mode. Optional, defaults to None.
|
||||
"""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def mac(self, data, uid, algorithm):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user