Skip to content

RSA encryption hangs on JS-target #10

@AlexKotik

Description

@AlexKotik

Hello! I wrote this code:

import com.hurlant.util.ByteArray;
import com.hurlant.util.der.PEM;

class Main {
    public static function main() {
        var key = PEM.readRSAPrivateKey("<PEM-key-here>");
        var src = ByteArray.fromInt32ArrayLE([10, 20, 30, 40]);
        var dst = new ByteArray();

        key.encrypt(dat, dst, 32);
        trace(dst.length);
    }
}

I compiled this code to JavaScript and run it in Internet Explorer.
However the JavaScript interpreter hangs eating up a lot of memory
(when I stopped it it was working for 10min and ate up 350Mb).
Seems like an infinite loop or something is going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions