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

+ 4 - 2
Object/UnicomObject.py

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