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 #include "asn1.h"
00030 #include "md.h"
00031
00032 #include <stddef.h>
00033 #include <stdint.h>
00034
00035 #define MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA -0x2f80
00036 #define MBEDTLS_ERR_PKCS5_INVALID_FORMAT -0x2f00
00037 #define MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE -0x2e80
00038 #define MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH -0x2e00
00040 #define MBEDTLS_PKCS5_DECRYPT 0
00041 #define MBEDTLS_PKCS5_ENCRYPT 1
00042
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046
00060 int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
00061 const unsigned char *pwd, size_t pwdlen,
00062 const unsigned char *data, size_t datalen,
00063 unsigned char *output );
00064
00079 int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx, const unsigned char *password,
00080 size_t plen, const unsigned char *salt, size_t slen,
00081 unsigned int iteration_count,
00082 uint32_t key_length, unsigned char *output );
00083
00089 int mbedtls_pkcs5_self_test( int verbose );
00090
00091 #ifdef __cplusplus
00092 }
00093 #endif
00094
00095 #endif