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
00047 #if defined(MBEDTLS_ASN1_PARSE_C)
00048
00062 int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
00063 const unsigned char *pwd, size_t pwdlen,
00064 const unsigned char *data, size_t datalen,
00065 unsigned char *output );
00066
00067 #endif
00068
00083 int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx, const unsigned char *password,
00084 size_t plen, const unsigned char *salt, size_t slen,
00085 unsigned int iteration_count,
00086 uint32_t key_length, unsigned char *output );
00087
00093 int mbedtls_pkcs5_self_test( int verbose );
00094
00095 #ifdef __cplusplus
00096 }
00097 #endif
00098
00099 #endif