diff options
Diffstat (limited to 'include/asterisk/crypto.h')
-rw-r--r-- | include/asterisk/crypto.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/asterisk/crypto.h b/include/asterisk/crypto.h index d0f852caf..32233fc17 100644 --- a/include/asterisk/crypto.h +++ b/include/asterisk/crypto.h @@ -32,15 +32,15 @@ extern "C" { struct ast_key; -/*! \brief Retrieve a key +/*! \brief Retrieve a key * \param name of the key we are retrieving * \param int type of key (AST_KEY_PUBLIC or AST_KEY_PRIVATE) * * Returns the key on success or NULL on failure */ -extern struct ast_key *(*ast_key_get)(const char *key, int type); +struct ast_key *(*ast_key_get)(const char *key, int type); -/*! \brief Check the authenticity of a message signature using a given public key +/*! \brief Check the authenticity of a message signature using a given public key * \param key a public key to use to verify * \param msg the message that has been signed * \param sig the proposed valid signature in mime64-like encoding @@ -48,9 +48,9 @@ extern struct ast_key *(*ast_key_get)(const char *key, int type); * Returns 0 if the signature is valid, or -1 otherwise * */ -extern int (*ast_check_signature)(struct ast_key *key, const char *msg, const char *sig); +int (*ast_check_signature)(struct ast_key *key, const char *msg, const char *sig); -/*! \brief Check the authenticity of a message signature using a given public key +/*! \brief Check the authenticity of a message signature using a given public key * \param key a public key to use to verify * \param msg the message that has been signed * \param sig the proposed valid signature in raw binary representation @@ -58,7 +58,7 @@ extern int (*ast_check_signature)(struct ast_key *key, const char *msg, const ch * Returns 0 if the signature is valid, or -1 otherwise * */ -extern int (*ast_check_signature_bin)(struct ast_key *key, const char *msg, int msglen, const unsigned char *sig); +int (*ast_check_signature_bin)(struct ast_key *key, const char *msg, int msglen, const unsigned char *sig); /*! * \param key a private key to use to create the signature @@ -69,7 +69,7 @@ extern int (*ast_check_signature_bin)(struct ast_key *key, const char *msg, int * Returns 0 on success or -1 on failure. * */ -extern int (*ast_sign)(struct ast_key *key, char *msg, char *sig); +int (*ast_sign)(struct ast_key *key, char *msg, char *sig); /*! * \param key a private key to use to create the signature @@ -80,7 +80,7 @@ extern int (*ast_sign)(struct ast_key *key, char *msg, char *sig); * Returns 0 on success or -1 on failure. * */ -extern int (*ast_sign_bin)(struct ast_key *key, const char *msg, int msglen, unsigned char *sig); +int (*ast_sign_bin)(struct ast_key *key, const char *msg, int msglen, unsigned char *sig); /*! * \param key a private key to use to encrypt @@ -92,7 +92,7 @@ extern int (*ast_sign_bin)(struct ast_key *key, const char *msg, int msglen, uns * Returns length of encrypted data on success or -1 on failure. * */ -extern int (*ast_encrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key); +int (*ast_encrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key); /*! * \param key a private key to use to decrypt @@ -104,7 +104,7 @@ extern int (*ast_encrypt_bin)(unsigned char *dst, const unsigned char *src, int * Returns length of decrypted data on success or -1 on failure. * */ -extern int (*ast_decrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key); +int (*ast_decrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key); #if defined(__cplusplus) || defined(c_plusplus) } #endif |