mbed TLS v2.2.0
pkcs5.h
Go to the documentation of this file.
1 
25 #ifndef MBEDTLS_PKCS5_H
26 #define MBEDTLS_PKCS5_H
27 
28 #include "asn1.h"
29 #include "md.h"
30 
31 #include <stddef.h>
32 #include <stdint.h>
33 
34 #define MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -0x2f80
35 #define MBEDTLS_ERR_PKCS5_INVALID_FORMAT -0x2f00
36 #define MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -0x2e80
37 #define MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH -0x2e00
39 #define MBEDTLS_PKCS5_DECRYPT 0
40 #define MBEDTLS_PKCS5_ENCRYPT 1
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
59 int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
60  const unsigned char *pwd, size_t pwdlen,
61  const unsigned char *data, size_t datalen,
62  unsigned char *output );
63 
78 int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx, const unsigned char *password,
79  size_t plen, const unsigned char *salt, size_t slen,
80  unsigned int iteration_count,
81  uint32_t key_length, unsigned char *output );
82 
88 int mbedtls_pkcs5_self_test( int verbose );
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif /* pkcs5.h */
Generic message digest context.
Definition: md.h:66
int mbedtls_pkcs5_pbkdf2_hmac(mbedtls_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.
Type-length-value structure that allows for ASN1 using DER.
Definition: asn1.h:118
Generic message digest wrapper.
int mbedtls_pkcs5_self_test(int verbose)
Checkup routine.
int mbedtls_pkcs5_pbes2(const mbedtls_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.