17 #ifndef APR_CRYPTO_INTERNAL_H
18 #define APR_CRYPTO_INTERNAL_H
30 struct apr_crypto_driver_t {
42 apr_status_t (*init)(apr_pool_t *pool,
const char *params,
int *rc);
56 apr_status_t (*make)(apr_crypto_t **f,
const apr_crypto_driver_t *provider,
57 const char *params, apr_pool_t *pool);
67 apr_status_t (*get_block_key_types)(apr_hash_t **types,
68 const apr_crypto_t *f);
78 apr_status_t (*get_block_key_modes)(apr_hash_t **modes,
79 const apr_crypto_t *f);
109 apr_status_t (*passphrase)(apr_crypto_key_t **key, apr_size_t *ivSize,
110 const char *pass, apr_size_t passLen,
const unsigned char * salt,
113 const int iterations,
const apr_crypto_t *f, apr_pool_t *p);
131 apr_status_t (*block_encrypt_init)(apr_crypto_block_t **ctx,
132 const unsigned char **iv,
const apr_crypto_key_t *key,
133 apr_size_t *blockSize, apr_pool_t *p);
153 apr_status_t (*block_encrypt)(
unsigned char **out, apr_size_t *outlen,
154 const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx);
174 apr_status_t (*block_encrypt_finish)(
unsigned char *out,
175 apr_size_t *outlen, apr_crypto_block_t *ctx);
192 apr_status_t (*block_decrypt_init)(apr_crypto_block_t **ctx,
193 apr_size_t *blockSize,
const unsigned char *iv,
194 const apr_crypto_key_t *key, apr_pool_t *p);
214 apr_status_t (*block_decrypt)(
unsigned char **out, apr_size_t *outlen,
215 const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx);
235 apr_status_t (*block_decrypt_finish)(
unsigned char *out,
236 apr_size_t *outlen, apr_crypto_block_t *ctx);
244 apr_status_t (*block_cleanup)(apr_crypto_block_t *ctx);
252 apr_status_t (*cleanup)(apr_crypto_t *f);
259 apr_status_t (*shutdown)(void);
267 apr_status_t (*error)(
const apu_err_t **result,
const apr_crypto_t *f);
apr_crypto_block_key_type_e
Definition: apr_crypto.h:102
Definition: apu_errno.h:161
apr_crypto_block_key_mode_e
Definition: apr_crypto.h:111