"Saju Paul" <[EMAIL PROTECTED]> writes:
> It is very clear that you Thomas have never ever used the hmac routines !!
> So how you entertain yourself is irrelevant to the problem being discussed.
> thank you.
You'll need to give more information. For me, the following C++
program compiles, links (needs to link against "-lcrypto -lssl"), and
runs (printing the unexciting "md_len = 20"). This is using gcc (4.1)
on GNU/Linux, x86, with OpenSSL 0.9.8e.
#include <openssl/ssl.h>
#include <openssl/hmac.h>
#include <strings.h>
#include <iostream>
int
main(int, char *[])
{
SSL_library_init();
OpenSSL_add_all_algorithms();
const char key[] = "hello";
const char data[] = "some data to hash";
unsigned char md[EVP_MAX_MD_SIZE];
unsigned int md_len;
HMAC(EVP_sha1(), key, strlen(key),
reinterpret_cast<const unsigned char*>(data), strlen(data),
md, &md_len);
std::cout << "md_len = " << md_len << std::endl;
}
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]