cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
evp.h
Go to the documentation of this file.
1
10#ifndef CWIST_SHIM_OPENSSL_EVP_H
11#define CWIST_SHIM_OPENSSL_EVP_H
12
13#include <stddef.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef struct cwist_mtls_evp_md EVP_MD;
20typedef struct cwist_mtls_cipher EVP_CIPHER;
21typedef struct cwist_mtls_cipher_ctx EVP_CIPHER_CTX;
22
23#define EVP_MAX_MD_SIZE 64
24
25#define EVP_sha256 cwist_mtls_EVP_sha256
26#define EVP_aes_256_cbc cwist_mtls_EVP_aes_256_cbc
27const EVP_MD *cwist_mtls_EVP_sha256(void);
29
30/* Block cipher context (AES-256-CBC with PKCS#7 padding, matching EVP
31 * defaults so db_crypt ciphertexts stay format-compatible). */
32#define EVP_CIPHER_CTX_new cwist_mtls_EVP_CIPHER_CTX_new
33#define EVP_CIPHER_CTX_free cwist_mtls_EVP_CIPHER_CTX_free
34#define EVP_EncryptInit_ex cwist_mtls_EVP_EncryptInit_ex
35#define EVP_EncryptUpdate cwist_mtls_EVP_EncryptUpdate
36#define EVP_EncryptFinal_ex cwist_mtls_EVP_EncryptFinal_ex
37#define EVP_DecryptInit_ex cwist_mtls_EVP_DecryptInit_ex
38#define EVP_DecryptUpdate cwist_mtls_EVP_DecryptUpdate
39#define EVP_DecryptFinal_ex cwist_mtls_EVP_DecryptFinal_ex
42int cwist_mtls_EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine,
43 const unsigned char *key, const unsigned char *iv);
44int cwist_mtls_EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
45 const unsigned char *in, int inl);
46int cwist_mtls_EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
47int cwist_mtls_EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine,
48 const unsigned char *key, const unsigned char *iv);
49int cwist_mtls_EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
50 const unsigned char *in, int inl);
51int cwist_mtls_EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
52
53#ifdef __cplusplus
54}
55#endif
56
57#endif /* CWIST_SHIM_OPENSSL_EVP_H */
int cwist_mtls_EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl)
int cwist_mtls_EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine, const unsigned char *key, const unsigned char *iv)
struct cwist_mtls_cipher EVP_CIPHER
Definition evp.h:20
struct cwist_mtls_cipher_ctx EVP_CIPHER_CTX
Definition evp.h:21
void cwist_mtls_EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
int cwist_mtls_EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
EVP_CIPHER_CTX * cwist_mtls_EVP_CIPHER_CTX_new(void)
int cwist_mtls_EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
int cwist_mtls_EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine, const unsigned char *key, const unsigned char *iv)
const EVP_MD * cwist_mtls_EVP_sha256(void)
struct cwist_mtls_evp_md EVP_MD
Definition evp.h:19
const EVP_CIPHER * cwist_mtls_EVP_aes_256_cbc(void)
int cwist_mtls_EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl)
size_t cap
Definition otel.c:56