
import hashlib
import pathlib
import sys
import os


hashs = []
filenames =[]


for _ in range(2):
	filenames.append(input("File name: "))

def hash(files):
	hashs = []
	print("starting hash this could take a while depending on file sizes")
	for filename in files:
		if os.path.exists(filename):
			hasher = hashlib.sha256()
			with open(filename, 'rb') as f:
				content = f.read()
				hasher.update(content)
			hashs.append(hasher.hexdigest())
		else:
			sys.exit("File not found")
	return hashs

hashs =hash(filenames)
if hashs[0] == hashs[1]:
	print("Hash is the same. The hash is ",hashs[1])
else:
	print("The hashs are not the same")
	print("File one hash ",hashs[0])
	print("File two hash ",hashs[1])
