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.
20 #include <kripto/mac.h>
21 #include <kripto/mac/hmac.h>
22 #include <kripto/hash/sha1.h>
23 #include <kripto/hash/sha2_256.h>
27 kripto_mac_desc
*desc
;
32 desc
= kripto_mac_hmac(kripto_hash_sha1
);
35 puts("de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9");
39 "The quick brown fox jumps over the lazy dog", 43,
45 for(i
= 0; i
< 20; i
++) printf("%.2x", hash
[i
]);
49 desc
= kripto_mac_hmac(kripto_hash_sha2_256
);
52 puts("f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8");
56 "The quick brown fox jumps over the lazy dog", 43,
62 for(i
= 0; i
< 32; i
++) printf("%.2x", hash
[i
]);