diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-21 19:11:32 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-21 19:11:32 +0000 |
commit | 15f42844eff69ae1f2576497c2653a7423f42395 (patch) | |
tree | 702c8203da791c3e168d1a0ef5d07dbafea3dd54 /funcs | |
parent | fe09035019d8f513addec09466170dfc180a1de3 (diff) |
Remove built-in AES code and use optional_api instead
Review: https://reviewboard.asterisk.org/r/793/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@278538 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_aes.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/funcs/func_aes.c b/funcs/func_aes.c index 87319fa77..21ee244ab 100644 --- a/funcs/func_aes.c +++ b/funcs/func_aes.c @@ -22,6 +22,9 @@ * \ingroup functions */ +/*** MODULEINFO + <use>crypto</use> + ***/ #include "asterisk.h" @@ -30,7 +33,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/pbx.h" #include "asterisk/app.h" -#include "asterisk/aes.h" +#include "asterisk/crypto.h" #define AES_BLOCK_SIZE 16 @@ -97,8 +100,8 @@ static int aes_helper(struct ast_channel *chan, const char *cmd, char *data, return -1; } - ast_aes_encrypt_key((unsigned char *) args.key, &ecx); /* encryption: plaintext -> encryptedtext -> base64 */ - ast_aes_decrypt_key((unsigned char *) args.key, &dcx); /* decryption: base64 -> encryptedtext -> plaintext */ + ast_aes_set_encrypt_key((unsigned char *) args.key, &ecx); /* encryption: plaintext -> encryptedtext -> base64 */ + ast_aes_set_decrypt_key((unsigned char *) args.key, &dcx); /* decryption: base64 -> encryptedtext -> plaintext */ tmp = ast_calloc(1, len); /* requires a tmp buffer for the base64 decode */ tmpP = tmp; encrypt = strcmp("AES_DECRYPT", cmd); /* -1 if encrypting, 0 if decrypting */ |