1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-04-19 00:29:03 +00:00

fixup! refactor(python): implement anti-exfil protocol helper functions

This commit is contained in:
Ondřej Vejpustek 2025-04-02 15:31:46 +02:00
parent 767774f479
commit 5176d5950c

View File

@ -1,3 +1,4 @@
import secrets
from dataclasses import dataclass
from hashlib import sha256
from typing import Optional
@ -13,9 +14,7 @@ class AntiExfilSignature:
def generate_entropy() -> bytes:
import os
return os.urandom(32)
return secrets.token_bytes(32)
def sha256_data(message: bytes) -> bytes: