Skip to content

Commit a275405

Browse files
committed
Remove securesystemslib.hash
fixes #943 * Internally, the features added by the module (i.e. custom blake name support, and file hashing) are not needed. Builtin hashlib is used now directly. * External users port the relevant features into their code base: theupdateframework/python-tuf#2815 in-toto/in-toto#861 Signed-off-by: Lukas Puehringer <[email protected]>
1 parent 65fb086 commit a275405

File tree

6 files changed

+10
-614
lines changed

6 files changed

+10
-614
lines changed

securesystemslib/hash.py

Lines changed: 0 additions & 354 deletions
This file was deleted.

securesystemslib/signer/_azure_signer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
from __future__ import annotations
44

5+
import hashlib
56
import logging
67
from urllib import parse
78

8-
import securesystemslib.hash as sslib_hash
99
from securesystemslib.exceptions import UnsupportedLibraryError
1010
from securesystemslib.signer._key import Key, SSlibKey
1111
from securesystemslib.signer._signer import SecretsHandler, Signature, Signer
@@ -245,7 +245,7 @@ def sign(self, payload: bytes) -> Signature:
245245
Signature.
246246
"""
247247

248-
hasher = sslib_hash.digest(self.hash_algorithm)
248+
hasher = hashlib.new(self.hash_algorithm)
249249
hasher.update(payload)
250250
digest = hasher.digest()
251251
response = self.crypto_client.sign(self.signature_algorithm, digest)

0 commit comments

Comments
 (0)