forgot to return the decrypted value with new function

This commit is contained in:
crp3844
2022-09-07 11:10:23 -04:00
parent 70aa686988
commit a4bac299ac

View File

@@ -164,18 +164,17 @@ def encrypt(client, data):
except Exception as e:
logger.error(e)
def decrypt_finder(client, data):
def decrypt(client, data):
array_json = base64.b64decode(data)
array = json.loads(array_json)
if array['version'] == 1:
decrypt_v1(client, array)
return decrypt_v1(client, array)
else:
logger.error("Unable to detemine encryption version.")
return False
def decrypt(client, data):
def decrypt_v1(client, array):
try:
array_json = base64.b64decode(data)
array = json.loads(array_json)
logger.debug("Dict of info: {}".format(array))
key_id = array['cipher_key_id']
iv = base64.b64decode(array['iv'])