feat(client): fall back to pure-Python SRP when srp is unimportable

Wrap `import srp` so a missing C-extension (e.g. Termux/aarch64) transparently
loads _srp_pure as srp. No call-site changes — the shim mirrors the srp API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
leetcrypt
2026-07-07 15:04:31 -07:00
parent a7b4840e9e
commit ffb8ef52f0
+3
View File
@@ -7,7 +7,10 @@ from pathlib import Path
from typing import Optional from typing import Optional
from uuid import uuid4 from uuid import uuid4
try:
import srp import srp
except ImportError: # no aarch64 wheel / C-ext build under Termux — use the shim
from . import _srp_pure as srp
import requests import requests
from cryptography.fernet import Fernet from cryptography.fernet import Fernet
from cryptography.hazmat.primitives.kdf.hkdf import HKDF from cryptography.hazmat.primitives.kdf.hkdf import HKDF