This is an automated email from the ASF dual-hosted git repository. humbedooh pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/steve.git
commit a3304ba2d7edda9ee13f1c4f7c9ac7de260f3629 Author: Daniel Gruno <[email protected]> AuthorDate: Sun Jan 26 12:25:21 2025 +0100 update constants.hexdigest to accept other digest methods oops, forgot --- pysteve/lib/constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysteve/lib/constants.py b/pysteve/lib/constants.py index 402abc1..db0ec52 100644 --- a/pysteve/lib/constants.py +++ b/pysteve/lib/constants.py @@ -24,9 +24,9 @@ DB_TYPES = ( ) -def hexdigest(data: str): +def hexdigest(data: str, method=hashlib.sha224): """Wrapper for hashlib.sha224().hexdigest that handles encoding""" - return hashlib.sha224(data.encode("utf-8")).hexdigest() + return method(data.encode("utf-8")).hexdigest() def appendVote(*types): """ Append a new type of voting to the list"""
