mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-05-13 07:26:45 +00:00
fix cython errors
This commit is contained in:
@@ -275,7 +275,7 @@ class SubscribeChain(ChainBase, metaclass=Singleton):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def search(self, sid: int = None, state: str = 'N', manual: bool = False):
|
def search(self, sid: int = None, state: Optional[str] = 'N', manual: bool = False):
|
||||||
"""
|
"""
|
||||||
订阅搜索
|
订阅搜索
|
||||||
:param sid: 订阅ID,有值时只处理该订阅
|
:param sid: 订阅ID,有值时只处理该订阅
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import base64
|
import base64
|
||||||
import hashlib
|
import hashlib
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from typing import Union
|
from typing import Union, Optional, Tuple
|
||||||
|
|
||||||
from Crypto import Random
|
from Crypto import Random
|
||||||
from Crypto.Cipher import AES
|
from Crypto.Cipher import AES
|
||||||
@@ -13,7 +13,7 @@ from cryptography.hazmat.primitives.asymmetric import padding as asym_padding, r
|
|||||||
class RSAUtils:
|
class RSAUtils:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def generate_rsa_key_pair(key_size: int = 2048) -> (str, str):
|
def generate_rsa_key_pair(key_size: int = 2048) -> Tuple[str, str]:
|
||||||
"""
|
"""
|
||||||
生成RSA密钥对
|
生成RSA密钥对
|
||||||
:return: 私钥和公钥(Base64 编码,无标识符)
|
:return: 私钥和公钥(Base64 编码,无标识符)
|
||||||
@@ -46,7 +46,7 @@ class RSAUtils:
|
|||||||
return private_key_b64, public_key_b64
|
return private_key_b64, public_key_b64
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def verify_rsa_keys(private_key: str, public_key: str) -> bool:
|
def verify_rsa_keys(private_key: Optional[str], public_key: Optional[str]) -> bool:
|
||||||
"""
|
"""
|
||||||
使用 RSA 验证私钥和公钥是否匹配
|
使用 RSA 验证私钥和公钥是否匹配
|
||||||
|
|
||||||
|
|||||||
6
setup.py
6
setup.py
@@ -29,9 +29,9 @@ setup(
|
|||||||
"auto_pickle": False,
|
"auto_pickle": False,
|
||||||
"embedsignature": True,
|
"embedsignature": True,
|
||||||
"annotation_typing": True,
|
"annotation_typing": True,
|
||||||
"infer_types": False
|
"infer_types": True,
|
||||||
},
|
"binding": True,
|
||||||
annotate=True
|
}
|
||||||
),
|
),
|
||||||
script_args=["build_ext", "-j8", "--inplace"],
|
script_args=["build_ext", "-j8", "--inplace"],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user