I'm wondering about the concept of image hashing specifically SHA256. Like how do we do it? Can we hash the image based on the binary file? or do we need to convert the data into strings first then do normal hashing?

Are there any other ways on how to hash images in C++? without using any libraries?

  • 1
    $\begingroup$ This dupe question has lots of questions and one has your question. The rest of your question about C++ is off-topic in Cryptography.SE. Open the file read it and use SHA256 code. And note that like many cryptographic algorithms, the hash functins are operating in bits and bytes.. $\endgroup$ – kelalaka Sep 7 '20 at 14:09
  • $\begingroup$ Input to hash functions are defined in terms of binary data (bit/byte-string); images/pictures/photos are stored in one or another format as binary data (bit/byte-string). $\endgroup$ – DannyNiu Sep 8 '20 at 3:41

Browse other questions tagged or ask your own question.