class Backend_sign: def __init__(self): self.read = ReadConfig() def get_sign(self, sign_time): #加密方式 backend_login_token = self.read.get_token('banckend_login') accesssign = PublicUtils.hash_body(backend_login_token + str(sign_time)) # dict_data['accessSign'] = accesssign # print(dict_data) print(accesssign) return accesssign
class App_sign: def __init__(self): self.read = ReadConfig() def get_sign(self, dict_data): # dict_data['accessTime'] = Create_sign.location_time() # print(dict_data) accesssign = '' for key in sorted(dict_data): accesssign += xxxx + 'xxxx' + xxxxx + xxxx # print(accesssign) # print(type(accesssign)) #加密方式 app_login_token = self.read.get_token('app_login') accesssign = PublicUtils.hash_body(accesssign + app_login_token) # dict_data['accessSign'] = accesssign # print(dict_data) # print(accesssign) return accesssign