AbZip
1.0.0
Main Page
Classes
Files
File List
aes
pwd2key.h
1
/*
2
---------------------------------------------------------------------------
3
Copyright (c) 2002, Dr Brian Gladman, Worcester, UK. All rights reserved.
4
5
LICENSE TERMS
6
7
The free distribution and use of this software in both source and binary
8
form is allowed (with or without changes) provided that:
9
10
1. distributions of this source code include the above copyright
11
notice, this list of conditions and the following disclaimer;
12
13
2. distributions in binary form include the above copyright
14
notice, this list of conditions and the following disclaimer
15
in the documentation and/or other associated materials;
16
17
3. the copyright holder's name is not used to endorse products
18
built using this software without specific written permission.
19
20
ALTERNATIVELY, provided that this notice is retained in full, this product
21
may be distributed under the terms of the GNU General Public License (GPL),
22
in which case the provisions of the GPL apply INSTEAD OF those given above.
23
24
DISCLAIMER
25
26
This software is provided 'as is' with no explicit or implied warranties
27
in respect of its properties, including, but not limited to, correctness
28
and/or fitness for purpose.
29
---------------------------------------------------------------------------
30
Issue Date: 26/08/2003
31
32
This is an implementation of RFC2898, which specifies key derivation from
33
a password and a salt value.
34
*/
35
36
#ifndef PWD2KEY_H
37
#define PWD2KEY_H
38
39
#if defined(__cplusplus)
40
extern
"C"
41
{
42
#endif
43
44
void
derive_key(
45
const
unsigned
char
pwd[],
/* the PASSWORD, and */
46
unsigned
int
pwd_len,
/* its length */
47
const
unsigned
char
salt[],
/* the SALT and its */
48
unsigned
int
salt_len,
/* length */
49
unsigned
int
iter,
/* the number of iterations */
50
unsigned
char
key[],
/* space for the output key */
51
unsigned
int
key_len);
/* and its required length */
52
53
#if defined(__cplusplus)
54
}
55
#endif
56
57
#endif
Generated by
1.8.11