http://lxqyom6a3p6fdgsy6mpjyhjqjdpzleseck2jojwwzcilmsvduaeo7zyd.onion/2020/06/12/sha-256-in-bash-and-python-a-speed-comparison/index.html
/usr/bin/env python3
#Reads a file line by line and outputs the corresponding SHA-256 hashes
import sys, hashlib
try:
filename=sys.argv[1]
except IndexError:
print('Error: No input file specified')
sys.exit()
f = open(filename, 'r')
for line in f:
line = line.replace('\n', '').replace('\r', '')
sha256 = hashlib.sha256(line.encode('utf-8')).hexdigest()
print(sha256) They should be straightforward and quite self-explicatory. As usual, make these executable by running chmod +x...