From c6a704faec8d5f392fe8c41a949133891e3e1ffc Mon Sep 17 00:00:00 2001 From: tomvanmele Date: Wed, 30 Oct 2024 22:43:10 +0100 Subject: [PATCH] add recipe hasher --- recipe/sha256.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 recipe/sha256.py diff --git a/recipe/sha256.py b/recipe/sha256.py new file mode 100644 index 0000000..6e62b11 --- /dev/null +++ b/recipe/sha256.py @@ -0,0 +1,10 @@ +import hashlib +from pathlib import Path + +FILE = Path(__file__).parent / "compas_cra-0.5.0.tar.gz" + +with open(FILE, "rb") as f: + data = f.read() + h = hashlib.sha256(data).hexdigest() + +print(h)