tests/sha256line.py
author Georges Racinet <georges.racinet@cloudcrane.io>
Wed, 29 Jan 2025 18:26:10 +0100
changeset 52859 9f083ff3c96c
parent 51358 fa4c4fa232d6
permissions -rwxr-xr-x
rust-pyo3-dirstate: DirstateMap simple read-only methods This takes care of all read-only methods except: - copymap methods - methods returning iterators These two categories will be done in forthcoming changesets.

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