[Interest] Qt 5.12 Beta 3 slows down ext Javascript library (RSA encrypt)

ekke ekke at ekkes-corner.org
Mon Nov 5 20:32:03 CET 2018


Am 05.11.18 um 17:59 schrieb Thiago Macieira:
> On Monday, 5 November 2018 05:49:33 PST ekke wrote:
>> created a example app and now noticed, the app doesn't freeze,
>> but the exection of encrypt() slows down from
>>
>> 5 sec (Qt 5.11.2) to
>> 92 sec (Qt 5.12 Beta3)
>>
>> will open a bug report
> How about you encrypt using C++ instead? OpenSSL probably has the encryption 
> you need.
>
Thanks, Thiago for the hint - that was the first thing I tried, but
couldn't figure out HowTo make it work on Android and iOS.

It's only used when password has changed and must be entered: then
password must be RSA encrypted and base64 sent to server

so I was happy to find a JS solution which was implemented easy for
Android / iOS:

function doEncrypt() {
    var rsa = new MyRsa.RSAKey();
    rsa.setPublic(dataServer.modulusHex(), "10001")
    var res = rsa.encrypt(pwText.text)
    if(res) {
        return MyRsa.linebrk(res, 64)
    } else {
        return ""
    }
}

unfortunately now with 5.12 Beta it slows down by 20x.

on Android per ex. from 80 ms to 1700 ms (acceptable for my customer)

but iOS now is too slow

ekke




More information about the Interest mailing list