mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 20:36:30 +00:00
switch from hardware object to string
and replace mac address to disk serial number for more predictable hash key
This commit is contained in:
@@ -3,8 +3,6 @@ import hashlib
|
||||
import os
|
||||
from hashlib import sha384
|
||||
from credentials cimport Credentials
|
||||
from hardware_service cimport HardwareInfo
|
||||
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
||||
from cryptography.hazmat.primitives import padding
|
||||
@@ -48,8 +46,8 @@ cdef class Security:
|
||||
return bytes(plaintext_bytes)
|
||||
|
||||
@staticmethod
|
||||
cdef get_hw_hash(HardwareInfo hardware):
|
||||
cdef str key = f'Azaion_{hardware.mac_address}_{hardware.cpu}_{hardware.gpu}'
|
||||
cdef get_hw_hash(str hardware):
|
||||
cdef str key = f'Azaion_{hardware}_%$$$)0_'
|
||||
return Security.calc_hash(key)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user