Debian Codegraph @

tests/sha256line.py

raw
1 #!/usr/bin/env python3
2 #
3 # A tool to help producing large and poorly compressible files
4 #
5 # Usage:
6 # $TESTDIR/seq.py 1000 | $TESTDIR/sha256line.py > my-file.txt
7
8
9 import hashlib
10 import sys
11
12
13 for line in sys.stdin:
14 print(hashlib.sha256(line.encode('utf8')).hexdigest())