Really pleased I found your code as is the sort of thing I am looking for.
I am just trying to run it first and since my programming knowledge is very limited I have a few questions!!
For the test data you suggested:
#include"HMAC_SHA1.h"
BYTE Key[20] ;
BYTE digest[20] ;
unsignedchar *test = "Hi There" ;
memset(Key, 20, 0x0b) ;
CHMAC_SHA1 HMAC_SHA1 ;
HMAC_SHA1.HMAC_SHA1(test, strlen(test), Key, sizeof(Key), digest) ;
// Check with digest equal to 0xb617318655057264e28bc0b6fb378c8ef146be00
// or not
...for this part above, is it just added into an already existing source code file of the program that will be run? At the moment I have linked them together in a makefile:
..where the file test.cpp is exactly the contents of test code you suggested above. It is giving some errors about converting between signed/unsigned ints and chars etc...so just wondering how to use that test code...does it need to be inside some sort of main() function etc to work?
...after that I am hoping to somehow do the receiver processing where the receiver calculates the digest and then compares into to the senders digest and produces an error if they do not match. I am programming in fields for the security extension header of a ULE subnetwork data unit.