sha256_test.c
Go to the documentation of this file.
1 /*
2  simple test of mavlink sha256 code.
3  */
4 #include <stdio.h>
5 #include <stdint.h>
6 #include <string.h>
7 
8 #include <mavlink_sha256.h>
9 
10 int main(int argc, const char *argv[])
11 {
13  uint8_t result[6];
14  uint8_t i;
15 
16  mavlink_sha256_init(&ctx);
17  mavlink_sha256_update(&ctx, argv[1], strlen(argv[1]));
18  mavlink_sha256_final_48(&ctx, result);
19  for (i=0; i<6; i++) {
20  printf("%02x ", (unsigned)result[i]);
21  }
22  printf("\n");
23  return 0;
24 }
int main(int argc, const char *argv[])
Definition: sha256_test.c:10


mavlink
Author(s): Lorenz Meier
autogenerated on Sun Apr 7 2019 02:06:02