chore: add uv, add ci, fix some issues (#113)
in preparation of removing secp
This commit is contained in:
parent
33c62ba1ea
commit
696cd96288
10 changed files with 2482 additions and 2775 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue