diff --git a/swh/model/model.py b/swh/model/model.py --- a/swh/model/model.py +++ b/swh/model/model.py @@ -203,6 +203,10 @@ return hashlib.new("sha1", manifest).digest() +def _compute_hash_from_manifest(manifest: bytes) -> Sha1Git: + return hashlib.new("sha1", manifest).digest() + + class HashableObject(metaclass=ABCMeta): """Mixin to automatically compute object identifier hash when the associated model is instantiated."""