On Wednesday, December 16, 2015 at 4:33:16 PM UTC-5, Jeffrey Walton wrote:
>
>
>
> On Wednesday, December 16, 2015 at 2:54:53 PM UTC-5, jh...@emocha.com 
> wrote:
>>
>> I'm trying to use crypto++ on android. I seem to have it compiled and 
>> linking, my app starts. 
>>
>> When I call my first encryption function it crashes:
>>
>> F/libc (24620): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadcab1 
>> in tid 24645 (QtThread)
>>
>>
>> The simple encryption function is :
>>
>>      CFB_Mode<AES>::Encryption e((const byte *) binKey.constData(), 
>> binKey.length(), staticIv, 1);
>>
>>      StringSource src((const byte *)txtDataUtf8.constData(), 
>> txtDataUtf8.length(), true,
>>
>>              new StreamTransformationFilter(e,
>>
>>                      new Base64Encoder(
>>
>>                              new StringSink(s)
>>
>>                              , false
>>
>>                      )
>>
>>              )
>>
>>      );
>>
>>
>> The function works fine on OSX. It's only on android. 
>>
>>
>> My android settings are:
>>
>> project.pro:
>> android {
>>      QT += androidextras
>>      LIBS += -lcryptopp-and 
>>      LDLIBS += -l -lc -lm -ldl -lgcc
>>      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
>>      ANDROID_EXTRA_LIBS += 
>> android-ndk-r10e/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_shared.so
>>      ANDROID_EXTRA_LIBS += cryptopp/libcryptopp-and.so
>> }
>>
>>
>> Does anyone have any idea why this might be happening?
>>
>>
> It looks like the default terminate handler is being called from QT. 
> 0xdeadcab1 is the address the Gabi++ uses; see 
> https://android.googlesource.com/platform/ndk/+/bfa632c/sources/cxx-stl/gabi++/src/terminate.cc#52
>  
> .
>
> Jeff 
>


Ok, but I'm not actually crashing, Qt's not crashing it either. It's 
crashing in the encryption function(s).  The only STL I use is for new 
StringSink(s)

If all else fails, is there a generic byte array/char * sink I can use 
instead?

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to