tests/sha256line.py
author Raphaël Gomès <rgomes@octobus.net>
Mon, 04 Nov 2024 15:23:41 +0100
changeset 52311 f7b2806035a7
parent 51361 fa4c4fa232d6
permissions -rwxr-xr-x
rust: update `clap` to the latest 4.x version This brings in more up-to-date dependencies, some bug fixes (none of which are relevant yet), and slightly improved compile times.

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