23 #ifndef _ASTERISK_CRYPTO_H 24 #define _ASTERISK_CRYPTO_H 26 #if defined(__cplusplus) || defined(c_plusplus) 34 #include "openssl/aes.h" 42 #define AST_KEY_PUBLIC (1 << 0) 43 #define AST_KEY_PRIVATE (1 << 1) 146 (
const unsigned char *key, ast_aes_encrypt_key *ctx),
158 (
const unsigned char *key, ast_aes_decrypt_key *ctx),
168 (
const unsigned char *
in,
unsigned char *
out,
const ast_aes_encrypt_key *ctx),
178 (
const unsigned char *in,
unsigned char *out,
const ast_aes_decrypt_key *ctx),
183 #if defined(__cplusplus) || defined(c_plusplus)
Optional API function macros.
#define AST_OPTIONAL_API(result, name, proto, stub)
Declare an optional API function.
int AST_OPTIONAL_API_NAME() ast_check_signature(struct ast_key *key, const char *msg, const char *sig)
base64 decode then sent to __ast_check_signature_bin
AES_KEY ast_aes_encrypt_key
int AST_OPTIONAL_API_NAME() ast_crypto_loaded(void)
void AST_OPTIONAL_API_NAME() ast_aes_encrypt(const unsigned char *in, unsigned char *out, const ast_aes_encrypt_key *ctx)
int AST_OPTIONAL_API_NAME() ast_sign(struct ast_key *key, char *msg, char *sig)
wrapper for __ast_sign_bin then base64 encode it
int AST_OPTIONAL_API_NAME() ast_encrypt_bin(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key)
encrypt a message
AES_KEY ast_aes_decrypt_key
int AST_OPTIONAL_API_NAME() ast_sign_bin(struct ast_key *key, const char *msg, int msglen, unsigned char *dsig)
signs outgoing message with public key
int AST_OPTIONAL_API_NAME() ast_check_signature_bin(struct ast_key *key, const char *msg, int msglen, const unsigned char *dsig)
check signature of a message
Support for logging to various files, console and syslog Configuration in file logger.conf.
int AST_OPTIONAL_API_NAME() ast_aes_set_encrypt_key(const unsigned char *key, ast_aes_encrypt_key *ctx)
struct ast_key *AST_OPTIONAL_API_NAME() ast_key_get(const char *kname, int ktype)
return the ast_key structure for name
int AST_OPTIONAL_API_NAME() ast_aes_set_decrypt_key(const unsigned char *key, ast_aes_decrypt_key *ctx)
void AST_OPTIONAL_API_NAME() ast_aes_decrypt(const unsigned char *in, unsigned char *out, const ast_aes_decrypt_key *ctx)
int AST_OPTIONAL_API_NAME() ast_decrypt_bin(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key)
decrypt a message