mirror of
https://github.com/Akagi201/hmac-sha1.git
synced 2025-05-08 11:27:31 +08:00
22 lines
378 B
C
22 lines
378 B
C
/*
|
|
* @file sample.c
|
|
* @author Akagi201
|
|
* @date 2014/12/05
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <hmac/hmac.h>
|
|
|
|
int main(void) {
|
|
char sec_key[] = "asdfgh";
|
|
char data[] = "jkluiop";
|
|
char out[256] = {0};
|
|
int len = sizeof(out);
|
|
|
|
hmac_sha1(sec_key, strlen(sec_key), data, strlen(data), out, &len);
|
|
|
|
printf("len: %d\n", len);
|
|
|
|
return 0;
|
|
} |