chore: add uv, add ci, fix some issues (#113)
Some checks are pending
CI / lint (push) Waiting to run

in preparation of removing secp
This commit is contained in:
dni ⚡ 2025-10-30 10:11:18 +01:00 committed by GitHub
parent 499b1f81f1
commit 3a8c16d155
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 2482 additions and 2775 deletions

View file

@ -1,6 +1,5 @@
import base64
import secrets
from typing import Optional
import secp256k1
from bech32 import bech32_decode, convertbits
@ -33,7 +32,7 @@ def decrypt_message(encoded_message: str, encryption_key) -> str:
return unpadded_data.decode()
def encrypt_message(message: str, encryption_key, iv: Optional[bytes] = None) -> str:
def encrypt_message(message: str, encryption_key, iv: bytes | None = None) -> str:
padder = padding.PKCS7(128).padder()
padded_data = padder.update(message.encode()) + padder.finalize()