multof assert fix
[rofl0r-kripto.git] / test / hash / sha1.c
blob7dc10962baceee68057cace73a83e30effe874ea
1 /*
2 * Copyright (C) 2013 Gregor Pintar <grpintar@gmail.com>
4 * Permission is granted to deal in this work without any restriction,
5 * including unlimited rights to use, publicly perform, publish,
6 * reproduce, relicence, modify, merge, and/or distribute in any form,
7 * for any purpose, with or without fee, and by any means.
9 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind,
10 * to the utmost extent permitted by applicable law. In no event
11 * shall a licensor, author or contributor be held liable for any
12 * issues arising in any way out of dealing in the work.
15 #include <stdio.h>
16 #include <stdint.h>
17 #include <string.h>
19 #include <kripto/hash.h>
20 #include <kripto/hash/sha1.h>
22 int main(void)
24 uint8_t hash[20];
25 unsigned int i;
27 /* 160 */
28 puts("2fd4e1c67a2d28fced849ee1bb76e7391b93eb12");
29 kripto_hash_all(kripto_hash_sha1, 0, "The quick brown fox jumps over the lazy dog", 43, hash, 20);
30 for(i = 0; i < 20; i++) printf("%.2x", hash[i]);
31 putchar('\n');
33 return 0;