tests/sha256line.py
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 19 Oct 2024 00:57:52 -0400
changeset 52026 e4961a4b4300
parent 51361 fa4c4fa232d6
permissions -rwxr-xr-x
contrib: drop python 3.7 from the Windows dependency installer script I'm tempted to drop 3.8 too, since we use 3.9 on Windows.

#!/usr/bin/env python3
#
# A tool to help producing large and poorly compressible files
#
# Usage:
#   $TESTDIR/seq.py 1000 | $TESTDIR/sha256line.py > my-file.txt


import hashlib
import sys


for line in sys.stdin:
    print(hashlib.sha256(line.encode('utf8')).hexdigest())