I am using a SHA1 Hash to verify the authenticity of a .wav file. The SHA1 function I am using takes in three parameter:
- a pointer to the authentication file with
.authextension - The data buffer read from the
.wavfile (which must be less than 42000 bytes in size) - The length of the buffer
for (int i = 0; i < size_buffer; i++) {
DataBuffer[i] = fgetc(WavResult);
}
util_sha1_calculate(&AuthContext, DataBuffer, size_buffer);
How can I set a read function to read 42000 bytes, transfer the data to util_sha1_calculate(&AuthContext, DataBuffer, size_buffer), and start from the position it left off when the loop is repeated, and proceed to read then next 42000 bytes?