RetroArch
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 
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 */
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.
Definition: pkcs5.c:217
GLenum mode
Definition: glext.h:6857
static const unsigned char password[MAX_TESTS][32]
Definition: pkcs5.c:305
static const size_t plen[MAX_TESTS]
Definition: pkcs5.c:302
Definition: ibxm.h:9
Definition: asn1.h:118
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
Generic message digest wrapper.
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.
Definition: pkcs5.c:111
static const size_t slen[MAX_TESTS]
Definition: pkcs5.c:314
std::string output
Definition: Config.FromFile.cpp:44
Definition: md.h:66
static const unsigned char salt[MAX_TESTS][40]
Definition: pkcs5.c:317
Generic ASN.1 parsing.
unsigned int uint32_t
Definition: stdint.h:126
int mbedtls_pkcs5_self_test(int verbose)
Checkup routine.
Definition: pkcs5.c:351