Skip to content

Commit 858dd55

Browse files
committed
Remove securesystemslib.hash
fixes secure-systems-lab#943 * Internal use does not need the additional features (custom blake algorithm name support and file hashing), and was replaced by direct calls to hashlib. * External users were updated to no longer require `securesystemslib.hash` (theupdateframework/python-tuf#2815, in-toto/in-toto#861) Signed-off-by: Lukas Puehringer <[email protected]>
1 parent 97678a2 commit 858dd55

File tree

6 files changed

+10
-614
lines changed

6 files changed

+10
-614
lines changed

securesystemslib/hash.py

-354
This file was deleted.

securesystemslib/signer/_azure_signer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Signer implementation for Azure Key Vault"""
22

3+
import hashlib
34
import logging
45
from typing import Optional, Tuple
56
from urllib import parse
67

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

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

0 commit comments

Comments
 (0)