1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 04:18:10 +00:00

chore(python): removing pyblake2 as a required library

This commit is contained in:
grdddj 2021-11-15 13:23:18 +01:00 committed by matejcik
parent 7cc9f13605
commit 57579c5a80
4 changed files with 2 additions and 14 deletions

View File

@ -5,5 +5,4 @@ click>=7,<9
libusb1>=1.6.4 libusb1>=1.6.4
construct>=2.9,!=2.10.55 construct>=2.9,!=2.10.55
typing_extensions>=3.7.4 typing_extensions>=3.7.4
pyblake2>=0.9.3 ; python_version<'3.6'
attrs attrs

View File

@ -13,7 +13,6 @@ install_requires = [
"libusb1>=1.6.4", "libusb1>=1.6.4",
"construct>=2.9", "construct>=2.9",
"typing_extensions>=3.7.4", "typing_extensions>=3.7.4",
"pyblake2>=0.9.3 ; python_version<'3.6'",
"attrs", "attrs",
] ]

View File

@ -1,5 +1,6 @@
import struct import struct
from enum import Enum from enum import Enum
from hashlib import blake2s
from typing import Any, List, Optional from typing import Any, List, Optional
import click import click
@ -7,12 +8,6 @@ import construct as c
from .. import cosi, firmware from .. import cosi, firmware
try:
from hashlib import blake2s
except ImportError:
from pyblake2 import blake2s
SYM_OK = click.style("\u2714", fg="green") SYM_OK = click.style("\u2714", fg="green")
SYM_FAIL = click.style("\u274c", fg="red") SYM_FAIL = click.style("\u274c", fg="red")

View File

@ -16,6 +16,7 @@
import hashlib import hashlib
from enum import Enum from enum import Enum
from hashlib import blake2s
from typing import Callable, List, Tuple from typing import Callable, List, Tuple
import construct as c import construct as c
@ -23,12 +24,6 @@ import ecdsa
from . import cosi, messages, tools from . import cosi, messages, tools
try:
from hashlib import blake2s
except ImportError:
from pyblake2 import blake2s
V1_SIGNATURE_SLOTS = 3 V1_SIGNATURE_SLOTS = 3
V1_BOOTLOADER_KEYS = [ V1_BOOTLOADER_KEYS = [
bytes.fromhex(key) bytes.fromhex(key)