Loading...
Searching...
No Matches
apr_crypto_internal.h
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef APR_CRYPTO_INTERNAL_H
#define APR_CRYPTO_INTERNAL_H
#include <stdarg.h>
#include "apr_crypto.h"
#ifdef __cplusplus
extern "C" {
#endif
#if APU_HAVE_CRYPTO
struct apr_crypto_driver_t {
const char *name;
apr_status_t (*init)(apr_pool_t *pool, const char *params,
const apu_err_t **result);
apr_status_t (*make)(apr_crypto_t **f, const apr_crypto_driver_t *provider,
const char *params, apr_pool_t *pool);
apr_status_t (*get_block_key_types)(apr_hash_t **types,
const apr_crypto_t *f);
apr_status_t (*get_block_key_modes)(apr_hash_t **modes,
const apr_crypto_t *f);
apr_status_t (*passphrase)(apr_crypto_key_t **key, apr_size_t *ivSize,
const char *pass, apr_size_t passLen, const unsigned char * salt,
apr_size_t saltLen, const apr_crypto_block_key_type_e type,
const apr_crypto_block_key_mode_e mode, const int doPad,
const int iterations, const apr_crypto_t *f, apr_pool_t *p);
apr_status_t (*block_encrypt_init)(apr_crypto_block_t **ctx,
const unsigned char **iv, const apr_crypto_key_t *key,
apr_size_t *blockSize, apr_pool_t *p);
apr_status_t (*block_encrypt)(unsigned char **out, apr_size_t *outlen,
const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx);
apr_status_t (*block_encrypt_finish)(unsigned char *out,
apr_size_t *outlen, apr_crypto_block_t *ctx);
apr_status_t (*block_decrypt_init)(apr_crypto_block_t **ctx,
apr_size_t *blockSize, const unsigned char *iv,
const apr_crypto_key_t *key, apr_pool_t *p);
apr_status_t (*block_decrypt)(unsigned char **out, apr_size_t *outlen,
const unsigned char *in, apr_size_t inlen, apr_crypto_block_t *ctx);
apr_status_t (*block_decrypt_finish)(unsigned char *out,
apr_size_t *outlen, apr_crypto_block_t *ctx);
apr_status_t (*block_cleanup)(apr_crypto_block_t *ctx);
apr_status_t (*cleanup)(apr_crypto_t *f);
apr_status_t (*shutdown)(void);
apr_status_t (*error)(const apu_err_t **result, const apr_crypto_t *f);
apr_status_t (*key)(apr_crypto_key_t **key, const apr_crypto_key_rec_t *rec,
const apr_crypto_t *f, apr_pool_t *p);
};
#endif
#ifdef __cplusplus
}
#endif
#endif
apr_crypto.h
APR-UTIL Crypto library.
apu_err_t
Definition apu_errno.h:161