Added support SHA224
[cryptodev-linux.git] / lib / main.c
blob443779af119dab8cf1d255a18d29b959f4ebdead
1 /*
2 * Demo on how to use /dev/crypto device for ciphering.
4 * Placed under public domain.
6 */
7 #include <stdio.h>
8 #include <string.h>
9 #include <unistd.h>
10 #include <fcntl.h>
11 #include <sys/ioctl.h>
12 #include <crypto/cryptodev.h>
13 #include "threshold.h"
15 int main()
17 int ret;
19 ret = get_sha1_threshold();
20 if (ret > 0)
21 printf("SHA1 in kernel outperforms user-space after %d input bytes\n", ret);
23 ret = get_aes_sha1_threshold();
24 if (ret > 0)
25 printf("AES-SHA1 in kernel outperforms user-space after %d input bytes\n", ret);
27 return 0;