forgot a few more client options
This commit is contained in:
@@ -159,7 +159,7 @@ def create_hmac_key():
|
||||
def encrypt(data):
|
||||
try:
|
||||
data = data.encode('UTF-8')
|
||||
key_id = create_encryption_key(client)
|
||||
key_id = create_encryption_key()
|
||||
iv = secrets.token_bytes(16)
|
||||
cipher_text, autogenerated_iv = client.encrypt(
|
||||
data,
|
||||
@@ -176,7 +176,7 @@ def encrypt(data):
|
||||
)
|
||||
hmac_key_id, hmac = client.mac(
|
||||
key_id.encode() + iv + cipher_text,
|
||||
uid = create_hmac_key(client),
|
||||
uid = create_hmac_key(),
|
||||
algorithm = enums.CryptographicAlgorithm.HMAC_SHA512
|
||||
)
|
||||
logger.debug("Successfully encrypted the data.")
|
||||
|
||||
Reference in New Issue
Block a user