sc-common-interface 2.9.6__tar.gz → 2.9.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/PKG-INFO +1 -1
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/ScWebsocket.py +25 -25
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/setup.py +1 -1
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/CommonOa.py +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/LiveCommonInterface.py +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/McCommonInterface.py +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/Platform.py +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/__init__.py +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/setup.cfg +0 -0
|
@@ -3,10 +3,10 @@ import ssl
|
|
|
3
3
|
import time
|
|
4
4
|
|
|
5
5
|
import requests
|
|
6
|
-
from cryptography.hazmat.primitives import hashes
|
|
7
|
-
from cryptography.hazmat.primitives.asymmetric import rsa, padding
|
|
8
|
-
from cryptography.hazmat.primitives import serialization
|
|
9
|
-
from cryptography.hazmat.backends import default_backend
|
|
6
|
+
# from cryptography.hazmat.primitives import hashes
|
|
7
|
+
# from cryptography.hazmat.primitives.asymmetric import rsa, padding
|
|
8
|
+
# from cryptography.hazmat.primitives import serialization
|
|
9
|
+
# from cryptography.hazmat.backends import default_backend
|
|
10
10
|
import base64
|
|
11
11
|
import websocket
|
|
12
12
|
|
|
@@ -83,27 +83,27 @@ def get_imtoken(admin_url,sales_id):
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
def sign(msg, private_key):
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
def load_private_key(pri_key_str):
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
# def sign(msg, private_key):
|
|
87
|
+
# # 将消息编码为字节
|
|
88
|
+
# # 从 字符串加载私钥
|
|
89
|
+
# loaded_private_key = load_private_key(private_key)
|
|
90
|
+
# message_bytes = msg.encode('utf-8')
|
|
91
|
+
# # 使用私钥进行签名
|
|
92
|
+
# signature = loaded_private_key.sign(
|
|
93
|
+
# message_bytes,
|
|
94
|
+
# padding.PKCS1v15(),
|
|
95
|
+
# hashes.SHA1()
|
|
96
|
+
# )
|
|
97
|
+
# # 将签名转换为 Base64 编码
|
|
98
|
+
# return base64.b64encode(signature).decode('utf-8')
|
|
99
|
+
#
|
|
100
|
+
# def load_private_key(pri_key_str):
|
|
101
|
+
# # 从 PEM 格式字符串加载私钥
|
|
102
|
+
# return serialization.load_pem_private_key(
|
|
103
|
+
# pri_key_str.encode(),
|
|
104
|
+
# password=None,
|
|
105
|
+
# backend=default_backend()
|
|
106
|
+
# )
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
if __name__=="__main__":
|
|
File without changes
|
{sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
File without changes
|
{sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc_common_interface-2.9.6 → sc_common_interface-2.9.7}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|