Allow "private" activation (skip some udev global rules) flag.
[platform/upstream/cryptsetup.git] / lib / luks1 / pbkdf.h
1 /*
2  * Implementation of Password-Based Cryptography as per PKCS#5
3  * Copyright (C) 2002,2003 Simon Josefsson
4  * Copyright (C) 2004 Free Software Foundation
5  *
6  * LUKS code
7  * Copyright (C) 2004, Clemens Fruhwirth <clemens@endorphin.org>
8  * Copyright (C) 2009-2012, Red Hat, Inc. All rights reserved.
9  *
10  * This file is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This file is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this file; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  *
24  */
25
26 #ifndef INCLUDED_CRYPTSETUP_LUKS_PBKDF_H
27 #define INCLUDED_CRYPTSETUP_LUKS_PBKDF_H
28
29 #include <stddef.h>
30
31 int PBKDF2_HMAC(const char *hash,
32                 const char *password, size_t passwordLen,
33                 const char *salt, size_t saltLen, unsigned int iterations,
34                 char *dKey, size_t dKeyLen);
35
36
37 int PBKDF2_performance_check(const char *hash, uint64_t *iter);
38 int PBKDF2_HMAC_ready(const char *hash);
39
40 #endif