How to get file hash in Windows with C++

sValentin 81 Reputation points
2023-11-16T08:08:51.5933333+00:00

I want to add an additional protection to check if the files of the program have been modified, and for this I want to get the hash of the files and compare them with the values that I know they should have.

Can this be done in C++ without using 3rd party libraries? If yes, can someone help me with code or link to learn Microsoft? I need for Windows only.

I'm not checking all the files, only a few that can be easily modified and that have really small sizes (around 70 KB in total).

Windows for business Windows Client for IT Pros User experience Other
Developer technologies C++
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,681 Reputation points
    2023-11-16T14:20:23.5266667+00:00

1 additional answer

Sort by: Most helpful
  1. RLWA32 49,536 Reputation points
    2023-11-16T09:24:38.01+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.