title: How to hash the contents of a file in C?
body: <p>What is the proper way to hash the contents of a file in C? I'm not trying to hash the file as a whole but rather line by line for the file. My main goal is to create a program that searches for hash collisions. I've written the program in C but it uses the system command to hash each line with both MD5 and SHA256. I understand that using the system command is unsafe and not the proper way to do this so I'm reaching out to the community to get the proper way to hash with MD5 and SHA256.</p>