added iOS source code
[wl-app.git] / iOS / Pods / SSZipArchive / SSZipArchive / minizip / aes / pwd2key.h
1 /*
2 ---------------------------------------------------------------------------
3 Copyright (c) 1998-2010, Brian Gladman, Worcester, UK. All rights reserved.
4
5 The redistribution and use of this software (with or without changes)
6 is allowed without the payment of fees or royalties provided that:
7
8   source code distributions include the above copyright notice, this
9   list of conditions and the following disclaimer;
10
11   binary distributions include the above copyright notice, this list
12   of conditions and the following disclaimer in their documentation.
13
14 This software is provided 'as is' with no explicit or implied warranties
15 in respect of its operation, including, but not limited to, correctness
16 and fitness for purpose.
17 ---------------------------------------------------------------------------
18 Issue Date: 20/12/2007
19
20 This is an implementation of RFC2898, which specifies key derivation from
21 a password and a salt value.
22 */
23
24 #ifndef PWD2KEY_H
25 #define PWD2KEY_H
26
27 #if defined(__cplusplus)
28 extern "C"
29 {
30 #endif
31
32 void derive_key(
33         const unsigned char pwd[],   /* the PASSWORD, and   */
34         unsigned int pwd_len,        /*    its length       */ 
35         const unsigned char salt[],  /* the SALT and its    */
36         unsigned int salt_len,       /*    length           */
37         unsigned int iter,      /* the number of iterations */
38         unsigned char key[],    /* space for the output key */
39         unsigned int key_len);  /* and its required length  */
40
41 #if defined(__cplusplus)
42 }
43 #endif
44
45 #endif