PolarSSL v1.3.2
pbkdf2.c
Go to the documentation of this file.
1 
30 /*
31  * PBKDF2 is part of PKCS#5
32  *
33  * http://tools.ietf.org/html/rfc2898 (Specification)
34  * http://tools.ietf.org/html/rfc6070 (Test vectors)
35  */
36 
37 #include "polarssl/config.h"
38 
39 #if defined(POLARSSL_PBKDF2_C)
40 
41 #include "polarssl/pbkdf2.h"
42 #include "polarssl/pkcs5.h"
43 
44 int pbkdf2_hmac( md_context_t *ctx, const unsigned char *password, size_t plen,
45  const unsigned char *salt, size_t slen,
46  unsigned int iteration_count,
47  uint32_t key_length, unsigned char *output )
48 {
49  return pkcs5_pbkdf2_hmac( ctx, password, plen, salt, slen, iteration_count,
50  key_length, output );
51 }
52 
53 #if defined(POLARSSL_SELF_TEST)
54 int pbkdf2_self_test( int verbose )
55 {
56  return pkcs5_self_test( verbose );
57 }
58 #endif /* POLARSSL_SELF_TEST */
59 
60 #endif /* POLARSSL_PBKDF2_C */
Password-Based Key Derivation Function 2 (from PKCS#5) DEPRECATED: use pkcs5.h instead.
int pkcs5_self_test(int verbose)
Checkup routine.
PKCS#5 functions.
Configuration options (set of defines)
int pkcs5_pbkdf2_hmac(md_context_t *ctx, const unsigned char *password, size_t plen, const unsigned char *salt, size_t slen, unsigned int iteration_count, uint32_t key_length, unsigned char *output)
PKCS#5 PBKDF2 using HMAC.
int pbkdf2_hmac(md_context_t *ctx, const unsigned char *password, size_t plen, const unsigned char *salt, size_t slen, unsigned int iteration_count, uint32_t key_length, unsigned char *output)
PKCS#5 PBKDF2 using HMAC DEPRECATED: Use pkcs5_pbkdf2_hmac() instead!
int pbkdf2_self_test(int verbose)
Checkup routine DEPRECATED: Use pkcs5_self_test() instead!
Generic message digest context.
Definition: md.h:129