21 #include "apr_pools.h"
22 #include "apr_tables.h"
42 #ifndef APU_CRYPTO_RECOMMENDED_DRIVER
44 #define APU_CRYPTO_RECOMMENDED_DRIVER "openssl"
47 #define APU_CRYPTO_RECOMMENDED_DRIVER "nss"
50 #define APU_CRYPTO_RECOMMENDED_DRIVER "mscng"
53 #define APU_CRYPTO_RECOMMENDED_DRIVER "mscapi"
104 APR_KEY_NONE, APR_KEY_3DES_192,
109 } apr_crypto_block_key_type_e;
117 } apr_crypto_block_key_mode_e;
120 typedef struct apr_crypto_driver_t apr_crypto_driver_t;
121 typedef struct apr_crypto_t apr_crypto_t;
122 typedef struct apr_crypto_config_t apr_crypto_config_t;
123 typedef struct apr_crypto_key_t apr_crypto_key_t;
124 typedef struct apr_crypto_block_t apr_crypto_block_t;
132 APU_DECLARE(apr_status_t) apr_crypto_init(apr_pool_t *pool);
142 APU_DECLARE(apr_status_t) apr_crypto_clear(apr_pool_t *pool,
void *buffer,
163 APU_DECLARE(apr_status_t) apr_crypto_get_driver(
164 const apr_crypto_driver_t **driver,
165 const
char *name, const
char *params, const
apu_err_t **result,
174 APU_DECLARE(const
char *) apr_crypto_driver_name(
175 const apr_crypto_driver_t *driver);
184 APU_DECLARE(apr_status_t) apr_crypto_error(const
apu_err_t **result,
185 const apr_crypto_t *f);
202 APU_DECLARE(apr_status_t) apr_crypto_make(apr_crypto_t **f,
203 const apr_crypto_driver_t *driver, const
char *params,
214 APU_DECLARE(apr_status_t) apr_crypto_get_block_key_types(apr_hash_t **types,
215 const apr_crypto_t *f);
225 APU_DECLARE(apr_status_t) apr_crypto_get_block_key_modes(apr_hash_t **modes,
226 const apr_crypto_t *f);
256 APU_DECLARE(apr_status_t) apr_crypto_passphrase(apr_crypto_key_t **key,
257 apr_size_t *ivSize, const
char *pass, apr_size_t passLen,
258 const
unsigned char * salt, apr_size_t saltLen,
259 const apr_crypto_block_key_type_e type,
260 const apr_crypto_block_key_mode_e mode, const
int doPad,
261 const
int iterations, const apr_crypto_t *f, apr_pool_t *p);
279 APU_DECLARE(apr_status_t) apr_crypto_block_encrypt_init(
280 apr_crypto_block_t **ctx, const
unsigned char **iv,
281 const apr_crypto_key_t *key, apr_size_t *blockSize, apr_pool_t *p);
301 APU_DECLARE(apr_status_t) apr_crypto_block_encrypt(
unsigned char **out,
302 apr_size_t *outlen, const
unsigned char *in, apr_size_t inlen,
303 apr_crypto_block_t *ctx);
323 APU_DECLARE(apr_status_t) apr_crypto_block_encrypt_finish(
unsigned char *out,
324 apr_size_t *outlen, apr_crypto_block_t *ctx);
339 APU_DECLARE(apr_status_t) apr_crypto_block_decrypt_init(
340 apr_crypto_block_t **ctx, apr_size_t *blockSize,
341 const
unsigned char *iv, const apr_crypto_key_t *key, apr_pool_t *p);
361 APU_DECLARE(apr_status_t) apr_crypto_block_decrypt(
unsigned char **out,
362 apr_size_t *outlen, const
unsigned char *in, apr_size_t inlen,
363 apr_crypto_block_t *ctx);
383 APU_DECLARE(apr_status_t) apr_crypto_block_decrypt_finish(
unsigned char *out,
384 apr_size_t *outlen, apr_crypto_block_t *ctx);
392 APU_DECLARE(apr_status_t) apr_crypto_block_cleanup(apr_crypto_block_t *ctx);
400 APU_DECLARE(apr_status_t) apr_crypto_cleanup(apr_crypto_t *f);
408 APU_DECLARE(apr_status_t) apr_crypto_shutdown(
409 const apr_crypto_driver_t *driver);
Definition: apu_errno.h:161