Is it possible to input a picture into the sha256 feature of hashlib and have it spit out a hash using Python?
Maybe this helps? Link
You have to import hashlib, open the file, and then calculate the hash.
import hashlib
filename = "Filepath to image file.png"
with open(filename,"rb") as f:
bytes = f.read() # read entire file as bytes
readable_hash = hashlib.sha256(bytes).hexdigest();
print(readable_hash)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With