mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-04 12:47:42 +08:00
40087fba9c
Modify the CMakeLists.txt Remove the USE_ORM macro Update trantor Remove some std::dynamic_pointer_cast calls
22 lines
569 B
C++
22 lines
569 B
C++
#include <drogon/config.h>
|
|
#ifdef OpenSSL_FOUND
|
|
#include <openssl/sha.h>
|
|
#else
|
|
#include "../lib/src/ssl_funcs/Sha1.h"
|
|
#endif
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int main()
|
|
{
|
|
unsigned char in[] =
|
|
"1234567890123456789012345678901234567890123456789012345"
|
|
"678901234567890123456789012345678901234567890";
|
|
unsigned char out[SHA_DIGEST_LENGTH] = {0};
|
|
SHA1(in, strlen((const char *)in), out);
|
|
/// fecfd28bbc9345891a66d7c1b8ff46e60192d284
|
|
for (int i = 0; i < SHA_DIGEST_LENGTH; i++)
|
|
printf("%02x", out[i]);
|
|
putchar('\n');
|
|
}
|