zhangdongming 3 years ago
parent
commit
5bc8900cbf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Object/UnicomObject.py

+ 2 - 2
Object/UnicomObject.py

@@ -11,7 +11,7 @@ import json
 
 
 import requests
 import requests
 from Crypto.Cipher import AES
 from Crypto.Cipher import AES
-from pysmx.SM3 import Hash_sm3
+from pysmx.SM3 import hash_msg
 from decimal import Decimal
 from decimal import Decimal
 from Ansjer.config import unicomAppUrl, unicomAppId, unicomAppSecret, unicomTenantId, \
 from Ansjer.config import unicomAppUrl, unicomAppId, unicomAppSecret, unicomTenantId, \
     unicomEncodeKey, unicomIvKey, unicomUserName, unicomPassword, unicomPushKey
     unicomEncodeKey, unicomIvKey, unicomUserName, unicomPassword, unicomPushKey
@@ -68,7 +68,7 @@ class UnicomObjeect:
         val = '&'.join(data_list)
         val = '&'.join(data_list)
         push_key = '&key={}'.format(self.pushKey)
         push_key = '&key={}'.format(self.pushKey)
         val = val + push_key
         val = val + push_key
-        return Hash_sm3(val).upper()
+        return hash_msg(val).upper()
 
 
     def get_login_authorization(self):
     def get_login_authorization(self):
         """
         """