ai_v/venv/Lib/site-packages/Cryptodome/PublicKey/ECC.pyi
公司git 67f2621a69 feat(payment): 集成支付宝支付与订单管理功能
- 在应用中注册支付蓝图(payment_bp)以支持支付接口
- 配置支付宝相关秘钥、回调地址及环境选项
- 新增订单模型(Order),支持订单数据存储与管理
- 管理后台接口添加订单列表查询功能,支持超级管理员访问
- 购买页面与表单修改,支持不同套餐的购买提交
- 支付成功页面提示,显示订单编号及积分到账信息
- 移除买积分按钮禁用逻辑,开放购买功能
2026-01-14 17:00:43 +08:00

81 lines
2.5 KiB
Python

from __future__ import annotations
from typing import Union, Callable, Optional, Tuple, Dict, NamedTuple, Any, overload, Literal
from typing_extensions import TypedDict, Unpack, NotRequired
from Cryptodome.Math.Numbers import Integer
from Cryptodome.IO._PBES import ProtParams
from ._point import EccPoint as EccPoint
from ._point import EccXPoint as EccXPoint
RNG = Callable[[int], bytes]
class UnsupportedEccFeature(ValueError):
...
class ExportParams(TypedDict):
passphrase: NotRequired[Union[bytes, str]]
use_pkcs8: NotRequired[bool]
protection: NotRequired[str]
compress: NotRequired[bool]
prot_params: NotRequired[ProtParams]
class EccKey(object):
curve: str
def __init__(self, *, curve: str = ..., d: int = ..., point: EccPoint = ...) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __repr__(self) -> str: ...
def has_private(self) -> bool: ...
@property
def d(self) -> int: ...
@property
def pointQ(self) -> EccPoint: ...
def public_key(self) -> EccKey: ...
@overload
def export_key(self,
*,
format: Literal['PEM', 'OpenSSH'],
**kwargs: Unpack[ExportParams]) -> str: ...
@overload
def export_key(self,
*,
format: Literal['DER', 'SEC1', 'raw'],
**kwargs: Unpack[ExportParams]) -> bytes: ...
_Curve = NamedTuple("_Curve", [('p', Integer),
('order', Integer),
('b', Integer),
('Gx', Integer),
('Gy', Integer),
('G', EccPoint),
('modulus_bits', int),
('oid', str),
('context', Any),
('desc', str),
('openssh', Union[str, None]),
])
_curves: Dict[str, _Curve]
def _import_rfc5915_der(encoded: bytes,
passphrase: Optional[str] = None,
curve_oid: Optional[str] = None) -> EccKey: ...
def generate(**kwargs: Union[str, RNG]) -> EccKey: ...
def construct(**kwargs: Union[str, int]) -> EccKey: ...
def import_key(encoded: Union[bytes, str],
passphrase: Optional[str] = None,
curve_name: Optional[str] = None) -> EccKey: ...
def _import_ed25519_public_key(encoded: bytes) -> EccKey: ...
def _import_ed448_public_key(encoded: bytes) -> EccKey: ...