Nan*_*mar 14 c gcc aes mcrypt pjsip
我正在使用PJSIP开源库进行AES加密.用于AES加密的库不是C编程中可用的内置库.所以,我已经使用外部库(Libmcrypt)进行AES加密.
我按照这个站点将libmcrypt库构建到我的机器(MAC OSX)中. https://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/
https://gist.github.com/bricef/2436364
在构建这些库时,它在/ usr/local/lib / path中创建了一个动态库(libmcrypt.dylib).当使用lipo -info libmcrypt.dylib命令检查该库的体系结构时,它显示
Non-fat file: libmcrypt.dylib is architecture: x86_64
Run Code Online (Sandbox Code Playgroud)
但我正在使用PJSIP 为Android和IOS设备创建这些应用程序.他们的架构是armeabi(android)和armv7(IOS).
将libmcrypt.dylib(x86_64)链接到PJSIP库(armv7)时,会显示以下错误.
Undefined symbols for architecture armv7:
"_mcrypt_enc_get_block_size", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_generic", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_generic_deinit", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_generic_init", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_module_close", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_module_open", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mdecrypt_generic", referenced from:
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../bin/pjsip-test-armv7-apple-darwin_ios] Error 1
make[1]: *** [pjsip-test-armv7-apple-darwin_ios] Error 2
make: *** [all] Error 1
Run Code Online (Sandbox Code Playgroud)
我对这些架构了解不多.是否可以将libmcrypt.dylib(x86_64)转换为libmcrypt.dylib(armv7).如果是,那么指导我如何将其转换为armv7架构,如果没有,那么抱歉浪费你的时间.
提前致谢!
不要使用mcrypt.自2007年以来,MCrypt库尚未更新.这是强烈建议您切换到OpenSSL或其他保持加密项目.
PJSIP文档提供了有关如何在IOS和Android设备上使用OpenSSL的说明:
归档时间: |
|
查看次数: |
360 次 |
最近记录: |