I have a small project to make a simple program that uses SHA-1 to hash a file. I'm using SHA-1 classes/code from codeproject (http://www.codeproject.com/cpp/csha1.asp) (SHA1.cpp and SHA1.h). All I'm trying to do is show the hash code of any file. I'm getting an error right when the program exits (only if the file exists and it gets hashed)
The code isn't hard to understand, not alot of it either, I would really appreciate the help on this. The error is a Native error and only is reported when using debug mode (I found this out in the help file). How can I fix my program? Obviously I want to practice good programming.Code:
Run-Time Check Failure #2 - Stack around the variable 'lpszHash' was corrupted.
PS - I changed the code, it used to check for a file specified in parameters to running the program, but I got sick of having to mess with that at the moment, so I specified for it to hash main.obj