forgot to return the decrypted value with new function
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user