From bfd935eb3fd3f87c86c3dd04fe84b67533245bd4 Mon Sep 17 00:00:00 2001 From: Physics <11247943+physics-sp@users.noreply.github.com> Date: Thu, 26 Mar 2020 19:09:53 -0300 Subject: [PATCH] allow to hash an empty string --- sha1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sha1.py b/sha1.py index 5b01ddd..1b5d2ff 100755 --- a/sha1.py +++ b/sha1.py @@ -143,7 +143,7 @@ def _produce_digest(self): return _process_chunk(message[64:], *h) -def sha1(data): +def sha1(data=b''): """SHA-1 Hashing Function A custom SHA-1 hashing function implemented entirely in Python.