tests/sha256line.py
author Matt Harbison <matt_harbison@yahoo.com>
Fri, 04 Oct 2024 13:26:29 -0400
changeset 51956 3b46e8e6a401
parent 51361 fa4c4fa232d6
permissions -rwxr-xr-x
tests: provide an alternate fake lock for filesystems without symlink support

#!/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())