PolarSSL v1.3.2
pkcs5.h
Go to the documentation of this file.
1 
29 #ifndef POLARSSL_PKCS5_H
30 #define POLARSSL_PKCS5_H
31 
32 #include <string.h>
33 
34 #include "asn1.h"
35 #include "md.h"
36 
37 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
38 #include <basetsd.h>
39 typedef UINT32 uint32_t;
40 #else
41 #include <inttypes.h>
42 #endif
43 
44 #define POLARSSL_ERR_PKCS5_BAD_INPUT_DATA -0x3f80
45 #define POLARSSL_ERR_PKCS5_INVALID_FORMAT -0x3f00
46 #define POLARSSL_ERR_PKCS5_FEATURE_UNAVAILABLE -0x3e80
47 #define POLARSSL_ERR_PKCS5_PASSWORD_MISMATCH -0x3e00
49 #define PKCS5_DECRYPT 0
50 #define PKCS5_ENCRYPT 1
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
69 int pkcs5_pbes2( asn1_buf *pbe_params, int mode,
70  const unsigned char *pwd, size_t pwdlen,
71  const unsigned char *data, size_t datalen,
72  unsigned char *output );
73 
88 int pkcs5_pbkdf2_hmac( md_context_t *ctx, const unsigned char *password,
89  size_t plen, const unsigned char *salt, size_t slen,
90  unsigned int iteration_count,
91  uint32_t key_length, unsigned char *output );
92 
98 int pkcs5_self_test( int verbose );
99 
100 #ifdef __cplusplus
101 }
102 #endif
103 
104 #endif /* pkcs5.h */
int pkcs5_self_test(int verbose)
Checkup routine.
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.
Generic ASN.1 parsing.
int pkcs5_pbes2(asn1_buf *pbe_params, int mode, const unsigned char *pwd, size_t pwdlen, const unsigned char *data, size_t datalen, unsigned char *output)
PKCS#5 PBES2 function.
Generic message digest wrapper.
Type-length-value structure that allows for ASN1 using DER.
Definition: asn1.h:116
Generic message digest context.
Definition: md.h:129