diff --git a/main.py b/main.py index 8b424c6..53c679b 100755 --- a/main.py +++ b/main.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 from sys import stdin from sys import exit as sysexit -from hashlib import blake2b from io import BytesIO from subprocess import Popen, PIPE import click +from blake3 import blake3 from identicon import Identicon @@ -86,10 +86,11 @@ def print_usage_and_exit(): def get_digest(stream): - hasher = blake2b(digest_size=DIGEST_SIZE) + # pylint: disable=not-callable + hasher = blake3() while data := stream.read(BUF_SIZE): hasher.update(data) - return hasher.digest() + return hasher.digest(length=DIGEST_SIZE)