internal 1.1.39.2__py3-none-any.whl → 1.1.39.4__py3-none-any.whl

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.

Potentially problematic release.


This version of internal might be problematic. Click here for more details.

internal/utils.py CHANGED
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  import json
3
+ import hashlib
3
4
  from datetime import datetime, timezone
4
5
 
5
6
  import arrow
@@ -105,6 +106,7 @@ def get_dealer_by_organization_id(organization_id: str) -> str:
105
106
 
106
107
  return organization_id
107
108
 
109
+
108
110
  def extract_title(name):
109
111
  if '小姐' in name:
110
112
  return '小姐'
@@ -115,6 +117,7 @@ def extract_title(name):
115
117
  else:
116
118
  return None
117
119
 
120
+
118
121
  def extract_name(name):
119
122
  """从姓名中提取真实姓名"""
120
123
  # 检查是否包含 '小姐' 或 '先生' 并提取姓名
@@ -125,4 +128,28 @@ def extract_name(name):
125
128
  elif '先生' in name:
126
129
  return name.split('先生')[0].strip()
127
130
  else:
128
- return name.strip()
131
+ return name.strip()
132
+
133
+
134
+ def hash_login_password(passwd):
135
+ prefix = '___'
136
+ postfix = '_______'
137
+ data = str(passwd)
138
+ sha_256 = hashlib.sha256()
139
+ sha_256.update(prefix.encode())
140
+ sha_256.update(data.encode())
141
+ sha_256.update(postfix.encode())
142
+
143
+ return sha_256.hexdigest()
144
+
145
+
146
+ def hash_secret_key(passwd):
147
+ prefix = '___'
148
+ postfix = '_______'
149
+ data = str(passwd)
150
+ sha_256 = hashlib.sha256()
151
+ sha_256.update(prefix.encode())
152
+ sha_256.update(data.encode())
153
+ sha_256.update(postfix.encode())
154
+
155
+ return sha_256.hexdigest()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: internal
3
- Version: 1.1.39.2
3
+ Version: 1.1.39.4
4
4
  Summary:
5
5
  Author: Ray
6
6
  Author-email: ray@cruisys.com
@@ -33,8 +33,8 @@ internal/middleware/log_request.py,sha256=ZtCyfrF3IyKTF6Uj8L66CutdZi3srVmppqO_EX
33
33
  internal/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  internal/model/base_model.py,sha256=2M9EUWitzG-5FD4tYbUULBcWL6045HfS6OkpwzevmsY,7892
35
35
  internal/model/operate.py,sha256=QSM6yXYXpJMwrqkUGEWZLrEBaUgqHwVHY_Fi4S42hKc,3190
36
- internal/utils.py,sha256=wK1QumW1AaWE1ga2-WcDH2rtXRr2hSLwXzy-iI5dTzY,3962
36
+ internal/utils.py,sha256=dVhKi3WPXQzVjaIGZBdfNjkMYtE7O-vKeyyOSX4mTG0,4518
37
37
  internal/validator_utils.py,sha256=CqjaVFoAu5MqvBG_AkTP-r7AliWawtUWB851USj4moI,1519
38
- internal-1.1.39.2.dist-info/METADATA,sha256=qm4E1RtqITZlQDcWyZPBWiwY4FULRZrgHjJg7KCzIvg,941
39
- internal-1.1.39.2.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
40
- internal-1.1.39.2.dist-info/RECORD,,
38
+ internal-1.1.39.4.dist-info/METADATA,sha256=j0gJufxymwJld35ELosysiBdkVivOvAuqzu8nshxgtI,941
39
+ internal-1.1.39.4.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
40
+ internal-1.1.39.4.dist-info/RECORD,,