On Wednesday, December 16, 2015 at 7:37:22 PM UTC-5, Jeffrey Walton wrote:
>
>
> What I do is concentrate my error checking and analysis on the desktop 
>> OSes, like OS X and Linux. Once I am satisfied the "core" logic is sound, I 
>> port it to another platform, like iOS and Android. The philosophy above 
>> means you need a clean separation between "core" and "window/ui" logic or 
>> routines. You'll get the hang of it quickly.
>>
>
> BTW, you don't quite have the clean separation. Notice QT objects are 
> cross-pollinating into the core routines. The constData() is part of a 
> QtString.
>
> CFB_Mode<AES>::Encryption e((const byte *) binKey.constData(), 
> binKey.length(), staticIv, 1);
>
>
> That means you can't test it stand-alone.
>


I redid the code to use simple static bytes:

        byte iv[16];

        byte bKey[32];

        memcpy(iv, binIv.constData(), sizeof(iv));

        memcpy(bKey, binKey.constData(), sizeof(bKey));


        CFB_Mode<AES>::Encryption e(bKey, 32, iv, 1);


        FileSource src((const char *)inFilename.toUtf8().constData(), true,

                new StreamTransformationFilter(e, //STF

                        new Base64Encoder(

                                new FileSink((const char 
*)outFilename.toUtf8().constData())

                                , false

                        )

                ) //STF

        );


Same issue. However, if I comment out the lines with //STF, so that it just 
removes the STF and just does a base64 encode, the code works. Which makes me 
think that it's specific to the STF. It is doing something because the phone 
gets hot. At which point I wonder if the issue is with architecture or 
packaging. I have created a fat library:


$ xcrun -sdk iphoneos lipo -info libcryptopp-ios.a
Architectures in the fat file: libcryptopp-ios.a are: armv7 x86_64 arm64


It's running on a iPhone 4, which is the arm7 arch, the arm7s is for the iPhone 
5 & 5c.


Do you have any idea why the STF would fail in this situation?


-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to