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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc_common_interface
3
- Version: 2.9.6
3
+ Version: 2.9.7
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -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
- 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
- )
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__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sc-common-interface
3
- Version: 2.9.6
3
+ Version: 2.9.7
4
4
  Summary: SC贴文销售公用的接口
5
5
  Home-page: UNKNOWN
6
6
  Author: river
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='sc_common_interface',
5
- version='2.9.6',
5
+ version='2.9.7',
6
6
  description='SC贴文销售公用的接口',
7
7
  author='river',
8
8
  packages=find_packages(),