removed extra decrypt version finder

This commit is contained in:
crp3844
2022-09-07 11:07:36 -04:00
parent f22321e226
commit 70aa686988

View File

@@ -164,8 +164,7 @@ def encrypt(client, data):
except Exception as e:
logger.error(e)
def decrypt(client, data):
def decrypt_finder(client, data):
array_json = base64.b64decode(data)
array = json.loads(array_json)
if array['version'] == 1:
@@ -173,8 +172,10 @@ def decrypt(client, data):
else:
logger.error("Unable to detemine encryption version.")
def decrypt_v1(client, array):
def decrypt(client, data):
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'])