2018-09-15 14:04:52 +00:00
|
|
|
#ifdef USE_OPENSSL
|
|
|
|
#include <openssl/sha.h>
|
|
|
|
#else
|
|
|
|
#include "../lib/src/Sha1.h"
|
|
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
|
|
int main()
|
|
|
|
{
|
2018-10-14 07:56:54 +00:00
|
|
|
unsigned char in[] = "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
|
|
|
|
unsigned char out[SHA_DIGEST_LENGTH] = {0};
|
|
|
|
SHA1(in, 100, out);
|
|
|
|
for (int i = 0; i < SHA_DIGEST_LENGTH; i++)
|
|
|
|
printf("%02x", out[i]);
|
2018-09-15 14:04:52 +00:00
|
|
|
putchar('\n');
|
|
|
|
}
|