mbed TLS v1.3.16
pkcs5.h
Go to the documentation of this file.
1 
26 #ifndef POLARSSL_PKCS5_H
27 #define POLARSSL_PKCS5_H
28 
29 #include "asn1.h"
30 #include "md.h"
31 
32 #include <stddef.h>
33 
34 #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
35 #include <basetsd.h>
36 typedef UINT32 uint32_t;
37 #else
38 #include <inttypes.h>
39 #endif
40 
41 #define POLARSSL_ERR_PKCS5_BAD_INPUT_DATA -0x3f80
42 #define POLARSSL_ERR_PKCS5_INVALID_FORMAT -0x3f00
43 #define POLARSSL_ERR_PKCS5_FEATURE_UNAVAILABLE -0x3e80
44 #define POLARSSL_ERR_PKCS5_PASSWORD_MISMATCH -0x3e00
46 #define PKCS5_DECRYPT 0
47 #define PKCS5_ENCRYPT 1
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
66 int pkcs5_pbes2( asn1_buf *pbe_params, int mode,
67  const unsigned char *pwd, size_t pwdlen,
68  const unsigned char *data, size_t datalen,
69  unsigned char *output );
70 
85 int pkcs5_pbkdf2_hmac( md_context_t *ctx, const unsigned char *password,
86  size_t plen, const unsigned char *salt, size_t slen,
87  unsigned int iteration_count,
88  uint32_t key_length, unsigned char *output );
89 
95 int pkcs5_self_test( int verbose );
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #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:121
Generic message digest context.
Definition: md.h:126