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.
18 #include <kripto/mac/hmac.h>
19 #include <kripto/hash/sha1.h>
20 #include <kripto/pbkdf2.h>
24 const uint8_t out
[20] =
26 0x4B, 0x00, 0x79, 0x01,
27 0xB7, 0x65, 0x48, 0x9A,
28 0xBE, 0xAD, 0x49, 0xD9,
29 0x26, 0xF7, 0x21, 0xD0,
30 0x65, 0xA4, 0x29, 0xC1
49 perror("kripto_pbkdf2() returned error");
53 for(i
= 0; i
< 20; i
++) if(buf
[i
] != out
[i
])
55 fputs("kripto_pbkdf2: FAIL\n", stderr
);
59 puts("kripto_pbkdf2: OK");