00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef MBEDTLS_PKCS5_H
00027 #define MBEDTLS_PKCS5_H
00028
00029 #if !defined(MBEDTLS_CONFIG_FILE)
00030 #include "config.h"
00031 #else
00032 #include MBEDTLS_CONFIG_FILE
00033 #endif
00034
00035 #include "asn1.h"
00036 #include "md.h"
00037
00038 #include <stddef.h>
00039 #include <stdint.h>
00040
00041 #define MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -0x2f80
00042 #define MBEDTLS_ERR_PKCS5_INVALID_FORMAT -0x2f00
00043 #define MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -0x2e80
00044 #define MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH -0x2e00
00046 #define MBEDTLS_PKCS5_DECRYPT 0
00047 #define MBEDTLS_PKCS5_ENCRYPT 1
00048
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052
00053 #if defined(MBEDTLS_ASN1_PARSE_C)
00054
00068 int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
00069 const unsigned char *pwd, size_t pwdlen,
00070 const unsigned char *data, size_t datalen,
00071 unsigned char *output );
00072
00073 #endif
00074
00089 int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx, const unsigned char *password,
00090 size_t plen, const unsigned char *salt, size_t slen,
00091 unsigned int iteration_count,
00092 uint32_t key_length, unsigned char *output );
00093
00099 int mbedtls_pkcs5_self_test( int verbose );
00100
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104
00105 #endif